Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
R

Right Handed Monkey

@Right Handed Monkey
About
Posts
3
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • paging in php [modified]
    R Right Handed Monkey

    Basically you are going to use a technique similar to that in a previous post: http://www.codeproject.com/script/Forums/View.aspx?fid=1640&msg=1742252[^] Your sql queries will use the LIMIT keyword which specifies the number of pages a query is broken into and how many results to display. In MySQL it's like this SELECT COUNT(*) AS total_pages FROM `table01`; $result = $dbHandle->query($sql); $row = $result->fetch_assoc(); $total_rows = $row['total_pages']; //You'll need to calculate the end page, to display links to prev and next $end_page = ceil($total_rows/$span); SELECT * FROM `table01` LIMIT 0, 10; where 0 is the current page being viewed (0 indexed) and 10 is the number of elements to return ($span). in your code, the query will be: "SELECT * FROM `table01` LIMIT $cur_page, $span" and $cur_page will be a GET requested variable $cur_page = $_GET['page']; if (!$cur_page) $cur_page = 0; Now display the results of the above query. Then display the previous and next links however you like display_link("page.php?cur_page=".$cur_page--); //prev display_link("page.php?cur_page=".$cur_page++); //next You can find a nicely formatted display was found on the web: http://www.phpeasystep.com/phptu/29.html[^]

    Linux, Apache, MySQL, PHP php mysql

  • add a code to button on click/submit
    R Right Handed Monkey

    Right, basically there is no equivalent. PHP runs before the client sees the web page and only on the server. Javascript/VB run on the client side (browser) after the page has been processed by the PHP. That is why it is called PHP Hypertext Pre-processor.

    Linux, Apache, MySQL, PHP

  • File Upload Encryption
    R Right Handed Monkey

    It's probably going to be easier to encrypt the file after sending it (but really not very useful). Is the same host downloading the file? Unless the same host that is downloading the file, you'll need to send some sort of encryption key. This site will likely have all that you need to get started: http://www.devhood.com/Tutorials/tutorial\_details.aspx?tutorial\_id=489 A secure and useful method would be to open a secure communication using a public/private key pair and then the server could send an encryption code for the client to encrypt the file. The client would then send the encrypted file to the server and there the server could decrypt the file since it knows the encryption code. That way is going to be a lot more difficult, but more practical. Hope that helps.

    ASP.NET
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups