Jump to content

Archived

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

jagguy

form data

Recommended Posts

If I want to send information on a form to a mysql db using php, do I need to use a cgi-script?

I want the user to send data .

Share this post


Link to post
Share on other sites
You dont need to use cgi-script.

PHP is more than capable of doing what you want to do. If you are unsure on what to do, then prehaps it'll be handy for you tot goto [url=http://www.php-mysql-tutorial.com/]php-mysql-tutorial.com/[/url]. I suggest you read through tutorials 3 throught to 7. If you are new to pHP and dont quite get the PHP syntax then start with tutorial number 2.

Share this post


Link to post
Share on other sites
No CGI

Just use POST in your form

Then what ever file you have it going to set up the php to input or update the DB

<form method="post" action="where_ever.php">

Then on where_ever.php set up your connections and write the sql you want:

$sql = "UPDATE table SET field = '$_POST[variable]' WHERE field2 = '$_POST[variable2]'";

Share this post


Link to post
Share on other sites

×

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.