Jump to content

help with php and forms


oracle259

Recommended Posts

Im a noobie to but this worked for me:

(this code needs to be within the <?php ?> brackets)


echo "<a href=yoururl.php?id='$varaibleYouWantToPass' />type your link text here</a>";


yoururl.php is where you put the location and file name you want to pass your data to.
$varaibleYouWantToPass is the varaible you want to pass.
You can do that by using javascript:
[code]

<s c r i p t type="text/javascript" language="javascript">
function submitform()
{
  document.my_form.submit();
}
</s c r i p t>

<form method="post" name="my_form" action="handle.php">
<input type="text" name="name">
<a href="javascript: submitform()">Submit</a>
</form>

[/code]

(compress "s c r i p t" and remove the spaces - due to posting restrictions on this board)

Archived

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

×
×
  • 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.