Jump to content

Archived

This topic is now archived and is closed to further replies.

OriginalSunny

passing info from one page to another

Recommended Posts

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

[i]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'
value='$type'><b>$type</b><br>\n";
}
}
echo "</ul>";
}
echo "<p><input type='submit' name='Products'
value='Select Category'>\n
</form>\n";[/i]

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??

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

}
echo "</tr>";[/i]

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

×

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.