O.K. people I'm new to this.. This is my first piece of PHP-code. Unfortunately it won't run.
Can somebody help me out? I want to have data that has been filled into a form put into a
mySQL database.
This is my script:
<?php
mysql_connect("db.xy.f2s.com:3306","username","password")
or die ("Could not connect to database");
$link = mysql ("bird","insert into bird (bird_id) values ('$textfield2'));
mysql_close ($link);
?>
The HTML-form:
<head>
<title>test form</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<form name="form1" method="post" action="bird_no.php">
<input type="text" name="textfield2">
<input type="submit" name="Submit" value="Submit">
</form>
</body>
And the error message I receive:
Parse error: parse error in /web/sites/225/frankalbers/www.cupbase.f2s.com/FormSites/bird_no.php on line 17
(Strangely there is no line 17...)
Thanks for your time,
Frank