On Fri, 18 Jul 2003, Ron Allen wrote:

} I am using a form to submit to mysql.  What I would like to do is to use a
} link to submit the form instead of the standard submit button.  Help is
} appreicated.

You could use a simple GET to submit the form. Make sure you have 
register_globals off though!

Something like this:

https://www.mysite.org/submit_form.php?user=me&client=bsd&browser=galeon

The page that calls the above page would have to have form entities for 
the 3 fields.

Then, on the submit_form page, you would take those vars and insert them 
in the database:

$insert_user = $_GET["user"];
$insert_client = $_GET["client"];
$insert_browser = $_GET["browser"];

Obviously the user could easily change the values in the URL before they 
submit [if they look at the html code behind the page]. Like all form 
processing, you need to make sure that the values submitted by the user 
are valid. register_globals being off is a step, but there are a lot of 
error correction functions you should run before submitting form data into 
a db.

HTH,

/vjl/


-- 
Vince LaMonica               UC Irvine,  School  of  Social Ecology
 W3 Developer       <*>      116 Social Ecology I, Irvine, CA 92697
 [EMAIL PROTECTED]                  http://www.seweb.uci.edu/techsupport

"This is like losing a game by forfeit when your team was ahead
with the bases loaded and your best batter on deck." 
 - Rep. John Conyers, on the DOJ agreeing to settle with Microsoft

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to