Jump to content

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.
Link to comment
https://forums.phpfreaks.com/topic/11985-combining-links/
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]
Link to comment
https://forums.phpfreaks.com/topic/11985-combining-links/#findComment-45606
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.