Levi, Very easy to do exactly what you want using php 1. write your link to a php page (described below) which includes the items you want stored appended to the link "<a href=page.php?var1=something&var2=something_else>go to next page</a>" 2. create a php page which contains the following: <?php $var1=$_GET['var1']; // converts $_GET[] var to something easier to type ; ) $var2=$_GET['var2']; 'evaluate var1 and var2 with conditional statements' 'open your mysql database' // you'll need to put your code here $result=mysql_query("insert into table_name (var1, var2) values ('$var1', '$var2') "); // stores data mysql_close($link); header("location: another_page.htm"); // sends user to your next page. php?>
Easy enough, but you'll need a form if you want user supplied info. Also, since the appended data could be altered before sent, this method is not secure from tampering. You'll need to evaluate the input to determine that it's what you expect. Hugh ----- Original Message ----- From: "Levi Zander" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, April 01, 2003 12:21 PM Subject: [PHP] use web hyperlink to insert data into MySQL? > I am trying to use PHP to create a hyperlink button that writes data to > MySQL database and sends the user to a new page.. is this possible? if so > would you post the syntax/site where I can find out how to do this... thx! > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php