Jump to content


Photo

Combining Links


  • Please log in to reply
3 replies to this topic

#1 gladiator83x

gladiator83x
  • Members
  • PipPipPip
  • Advanced Member
  • 45 posts

Posted 14 June 2006 - 02:51 PM

Hey All,

I was just trying to combine these two links below (Which work perfectly fine on their own).
-------------------------------------------------------------------------------------------
<?php

//link 1
echo "<a href=\"confirm.php?string11=$hlink\">Click this link to close the review and end the cycle.</a>";

//link 2
echo '<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.


#2 swatisonee

swatisonee
  • Members
  • PipPipPip
  • Advanced Member
  • 253 posts

Posted 14 June 2006 - 04:14 PM

Why the slash after "phone_number" ?


Shishya

#3 poirot

poirot
  • Members
  • PipPipPip
  • Advanced Member
  • 646 posts
  • LocationAustin, TX

Posted 14 June 2006 - 04:20 PM

@swatisonee: That slash is used to close the input tag. XHTML standards.

@gladiator83x: Replace:

echo '<form method="post" action=" confirm.php?string11=$hlink ">

With

echo '<form method="post" action=" confirm.php?string11=' . $hlink . ' ">

~ D Kuang

#4 swatisonee

swatisonee
  • Members
  • PipPipPip
  • Advanced Member
  • 253 posts

Posted 14 June 2006 - 04:40 PM

Duh ! what was i thinking !! I didnt read the code line thru !


Shishya




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users