A little trick I did to get the text from a textbox in a form
( for user comments ) without the user having to submit it was to
use javascript to append the textbox contents to a url ( GET METHOD )
when the user clicked on a link, which pointed to a redirect script
which extracted the textbox contents then redirected the user to the
link requested. Hopefull this will give you some ideas.


<script LANGUAGE="JavaScript">
function modifyurl (theurl,textvar,thepagename) {
           // do validation here on textvar, textvalue, etc. then proceed 
           theurl.href="redirect_script.php?requestedpage=" + thepagename + 
"&textvalue=" + escape(textvar);
// -->

<form name="thetextform" onSubmit="return false;">
<input type="text" name="textvariable" size=30 maxlength=45>

<a href="/another_page.html" onClick="modifyurl(this, 
thetextform.textvariable.value, 'another_page')">


...and here on the redirect page I would do validation of the 
variables/form_contents etc.,
insert it into a db, and then redirect:


switch ($requestedpage) {
    case "another_page":
        Header("Location: http://www.site.com/path/to/another_page.html";); 
//Redirect browser
    case ...


Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.

PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to