Search the Community
Showing results for tags 'get'.
-
BACKGROUND: In the past I have retrieved an HTTPRequest via the $_GET superglobal, used the data from the superglobal to access a MySQL database, and from the thus retrieved data, generated an array of parameter values that I then assigned to a local array. This local array was then assigned to a $_SESSION variable where it was used for other purposes. This time, I would like to make the routing of data less circuitous. QUESTION: Does the following expression make sense? $_SESSION = $_GET; Roddy
-
hi, so my problem is: i have a web page that produces a list [ul]. the list is the list of ftp sites that belong to a specific user in the database example: select * from user_ftps where user_id = 'x' great! that works fine. in this case i get three sites back belonging to the user. perfect. i also put a hyper link with a 'get' in the output so the user can click edit and edit the site they want. like so: if (mysql_num_rows($result) > 0) { while(list($db_id, $db_user_id, $db_name) = mysql_fetch_row($result)) { echo "<li>$db_name [<a href="ftps/edit?id=$db_id">edit</a>]</li>"; } } the problem is, using this method the user can alter the id in the url to the number of another user and see all their ftp sites. "Use Post with a hidden value" i hear you say. but if i do that i'll need to create a button for each 'edit' link. i think. not really a problem i surpose. but i want to know if there is a better way i can do this or if i'm just approching this in the wrong way and should be using a different method. regards, paul
-
suppose i have 10 products in my database Example:iphone 2 - iphone 3g - laptop i3 - laptop i7 - nokia n96 etcwhen i enter iphone in my search i see all records stored in database thats my prob!what i want ?suppose if i enter laptop i7 or laptop then i get result for laptop i7 or laptop here is my code.. <?php// Connects to your Databasemysql_connect("host.com", "userr", "pass") or die(mysql_error());mysql_select_db("products") or die(mysql_error()); [/font][/color][color=#000000][font=verdana, geneva, lucida,]$data = mysql_query("SELECT * FROM Products")or die(mysql_error());Print "<table border cellpadding=3>";while($info = mysql_fetch_array( $data )){Print "<tr>";Print "<th>Name:</th> <td>".$info['name'] . "</td> ";Print "<th>new:</th> <td>".$info['new_price'] . "</td> ";Print "<th>old:</th> <td>".$info['old_proce'] . "</td> ";Print "<th>faulty:</th> <td>".$info['Faulty_price'] . " </td></tr>";}Print "</table>";?> if any one have better code then please give me tankxx
-
Hello, im wondering how does jQuery get method work. Since it should not reload the page again? I've seen this, but how to example make this more automated whitout refreshing "http://mudsaf.info/games/index.php". $.ajax({ url: url, data: data, success: success, dataType: dataType});
-
I would like to do a script that includes content from pages according what the user chooses. Example If the users chooses Contact us from the menu I would like to have the index page displayed with the contact us content( www.website.com/index.php?page=contact-us ). I know it is done by GET requests but don't know how to do it or what is it called. Does anyone have a script or a tutorial on how to do it? Or at lest what is it called so I find a tutorial. Thanks before hand.