Jump to content

Archived

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

gladiator83x

Combining Links

Recommended Posts

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.

Share this post


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

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.