|
Posted by ELINTPimp on 05/16/07 12:41
On May 15, 9:50 pm, shotokan99 <soft_devj...@yahoo.com> wrote:
> for instance i do have this element but i dont have a <form>:
> <input type="Text" name="myname" id="myname" size="30"...>
>
> then i have this link:
> echo'<a href="mypage.php?name='.$myname.'...>Save</a>';
>
> i want that $myname will the value of myname textbox. something like
> this:
> $myname= <the value of the textbox>
>
> then on the side of mypage.php it will catch the values on same
> manner:
> $myname=$_GET['myname'];
> .
> .
> .
>
> i know this can be easily using <form>...</form>. but if i dont want
> to use a for will it be possible? incase it is, how get the value of
> the textbox and assign it to $myname variable?
If I understand your question, you wish to submit your form using a
textual link rather than a <input type="submit" ... />, button, or
image. HTML/PHP doesn't support this, but you can do it with a little
JavaScript. Still use a <form>, though:
<form method="post" action="my.php" name="hurray_js">
<input type="Text" name="myname" id="myname" size="30"...> <Br>
<a href="javascript:document.hurray_js.submit();">Submit</a>
</form>
my.php:
</php
$myname = $_POST['myname'];
.....
?>
cheers,
Steve
Navigation:
[Reply to this message]
|