OriginalSunny Posted March 18, 2006 Share Posted March 18, 2006 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. Quote Link to comment https://forums.phpfreaks.com/topic/5256-passing-info-from-one-page-to-another/ Share on other sites More sharing options...
ToonMariner Posted March 18, 2006 Share Posted March 18, 2006 your url should be of the form page.php?info1=this&info2=that&info3=otherpage.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. Quote Link to comment https://forums.phpfreaks.com/topic/5256-passing-info-from-one-page-to-another/#findComment-18675 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.