You are here: Re: help on taking textbox value without using a <form> « PHP Programming Language « IT news, forums, messages
Re: help on taking textbox value without using a <form>

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация