Jump to content


passing info from one page to another

  • Please log in to reply
1 reply to this topic

#1 OriginalSunny

  • Members
  • PipPipPip
  • Advanced Member
  • 95 posts

Posted 18 March 2006 - 10:06 PM

I am trying to pass info from one page to another. I have done it previously using the following code:

echo "Please select from one of the following:";
foreach($food_categories as $key => $subarray)
echo "<h3>$key</h3>";
echo "<ul>";
foreach($subarray as $type)
if ($type != "")
echo "<input type='radio' name='interest'
echo "</ul>";
echo "<p><input type='submit' name='Products'
value='Select Category'>\n

However i am now trying to do it on another page using a link instead of a list of the products and then selecting one of them and pressing the select button. How do i modify the code below to do this??

echo "<td><a href=\"{$products[$i]['modelNum']}.php\">more info</a></td>";

echo "</tr>";

(As you can see the code simply outputs a link to the more info page i want it to go to.

#2 ToonMariner

  • Members
  • PipPipPip
  • Advanced Member
  • 3,342 posts
  • LocationNewcastle upon Tyne, UK

Posted 18 March 2006 - 11:40 PM

your url should be of the form page.php?info1=this&info2=that&info3=other

page.php then does all the the suff depending on what variables you have passed to teh script and what values you have given them. Its all down to your logic to dictate the flow of the coed after that.
follow me on twitter @PHPsycho

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users