gladiator83x Posted June 14, 2006 Share Posted June 14, 2006 Hey All, I was just trying to combine these two links below (Which work perfectly fine on their own). -------------------------------------------------------------------------------------------<?php//link 1echo "<a href=\"confirm.php?string11=$hlink\">Click this link to close the review and end the cycle.</a>";//link 2echo '<form method="post" action="confirm2.php"> Date of Review Closure : <input type="text" name="phone_number" /><br><br><br /><input type="submit" name="submit" value="submit" /></form>';?>-------------------------------------------------------------------------------------------I was trying to include the hyperlink into the action portion of the form. My goal is to have $hlink and “phone_number” defined on the same page (file). This is what I have tried:<?echo '<form method="post" action=" confirm.php?string11=$hlink "> Date of Review Closure : <input type="text" name="phone_number" /><br><br><br /><input type="submit" name="submit" value="submit" /></form>';?>but I all I receive is the word $hlink instead of what it holds. Link to comment https://forums.phpfreaks.com/topic/11985-combining-links/ Share on other sites More sharing options...
swatisonee Posted June 14, 2006 Share Posted June 14, 2006 Why the slash after "phone_number" ? Link to comment https://forums.phpfreaks.com/topic/11985-combining-links/#findComment-45604 Share on other sites More sharing options...
poirot Posted June 14, 2006 Share Posted June 14, 2006 @swatisonee: That slash is used to close the input tag. XHTML standards.@gladiator83x: Replace:[code]echo '<form method="post" action=" confirm.php?string11=$hlink ">[/code]With[code]echo '<form method="post" action=" confirm.php?string11=' . $hlink . ' ">[/code] Link to comment https://forums.phpfreaks.com/topic/11985-combining-links/#findComment-45606 Share on other sites More sharing options...
swatisonee Posted June 14, 2006 Share Posted June 14, 2006 Duh ! what was i thinking !! I didnt read the code line thru ! Link to comment https://forums.phpfreaks.com/topic/11985-combining-links/#findComment-45612 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.