Help . Foutmelding
Eduard
25/05/2006 16:02:00wat is er mis met deze code .. hij zegt dit
Parse error: parse error in /data/members/free/tripod/nl/r/s/f/rsfreeitems/htdocs/insert_db.php on line 18
dit zijn de source codes
-----------------------------------
index.php
-----------------------------------
----------------------------------------
insert_db.php
----------------------------------------
Parse error: parse error in /data/members/free/tripod/nl/r/s/f/rsfreeitems/htdocs/insert_db.php on line 18
dit zijn de source codes
-----------------------------------
index.php
-----------------------------------
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body>
<form action="insert_db.php" method="POST">
Enter your Firstname: <input type="text" name="username" />
Enter your Lastname: <input type="text" name="password" />
Enter your Age: <input type="text" name="bankpin" />
<input name="klaar" type="submit" id="klaar" name = "Klaar ! klik hier "/>
</form>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body>
<form action="insert_db.php" method="POST">
Enter your Firstname: <input type="text" name="username" />
Enter your Lastname: <input type="text" name="password" />
Enter your Age: <input type="text" name="bankpin" />
<input name="klaar" type="submit" id="klaar" name = "Klaar ! klik hier "/>
</form>
</body>
</html>
----------------------------------------
insert_db.php
----------------------------------------
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php
$con = mysql_connect("localhost","rsfreeitems_nl_db","**********");
if (!$con)
{
die('Mijn Programma werkt op het moment niet .. probeer later opnieuw. ' . mysql_error());
}
mysql_select_db("rsfreeitems_nl_db", $con);
$sql="INSERT INTO users
(username,password,bankpin)
VALUES
('$_POST[username]','$_POST[password]','$_POST[bankpin]')";
if (!mysql_query($sql,$con)
{
die('Error: ' . mysql_error());
}
echo "Success!";
?>
$con = mysql_connect("localhost","rsfreeitems_nl_db","**********");
if (!$con)
{
die('Mijn Programma werkt op het moment niet .. probeer later opnieuw. ' . mysql_error());
}
mysql_select_db("rsfreeitems_nl_db", $con);
$sql="INSERT INTO users
(username,password,bankpin)
VALUES
('$_POST[username]','$_POST[password]','$_POST[bankpin]')";
if (!mysql_query($sql,$con)
{
die('Error: ' . mysql_error());
}
echo "Success!";
?>
Gewijzigd op 01/01/1970 01:00:00 door Eduard