Jump to content

Recommended Posts

I'm starting to learn Dreamweaver, PHP.. etc.

 

I have a real project I'm looking to impliment as I learn. Its a simple 2 page database search. I have 2 pages, 1 with search string field, and some radio buttons to limit the search, the second is my results page.

 

How do I pass along the parameters (string, radio buttons) after clicking the SEARCH button to the second page. These parameters will be used to define the sql query to display.

 

Thanks!

Link to comment
https://forums.phpfreaks.com/topic/1990-how-pass-parameters-in-url/
Share on other sites

  • 3 weeks later...

I did something similar with a sight that I'm working on right now. I was pasing the 'order number' on to the following page(s) and calling certain fields from the MySQL db.

 

I used a variable of $ID as the variable to track

 

I used a hyper link:

echo "<a href='phpscript.php?pid=$id'> Click here to continue with order # $id </a>";

 

Using a '?' after the *.php page name allows to you send variables to the next page and have those variables acted on.

 

Next, we need to receive the info:

$id = $_GET['pid'];


$result=mysql_query("SELCT * FROM images WHERE id={$id}");

 

Good Luck

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.