Associate
- Joined
- 28 Jan 2005
- Posts
- 1,124
Hi all,
I'm getting this error:
Fatal error: Call to undefined function escape_data() in C:\wamp\www\registerfe.php on line 8
From this code:
<?php # Script 7.7 - register.php (3rd version after Scripts 7.3 & 7.5)
include ('./projectincludes/header.html');
require_once ('../mysql_connect.php'); // Connect to the db.
$t = escape_data($_POST['Title']); < Line 8
$s = escape_data($_POST['Surname']);
$f = escape_data($_POST['Forename']);
$i = escape_data($_POST['Initials']);
// Make query
$query = "INSERT INTO forensic_entomologist (Fe_ID, Title, Surname, Forename, Initials) VALUES (NULL, $t, $s, $f, $i)";
$result = @mysql_query ($query); // Run the query.
?>
<h2>Register Forensic Entomologist</h2>
<form action="registerfe.php" method="post">
<p>Title: <input type="text" name="Title" size="15" maxlength="10" value="<?php if (isset($_POST['Title'])) echo $_POST['Title']; ?>" /></p>
<p>Surname: <input type="text" name="Surname" size="20" maxlength="25" value="<?php if (isset($_POST['Surname'])) echo $_POST['Surname']; ?>" /></p>
<p>Forename: <input type="text" name="Forename" size="20" maxlength="25" value="<?php if (isset($_POST['Forename'])) echo $_POST['Forename']; ?>" /> </p>
<p>Initials: <input type="text" name="Initials" size="10" maxlength="5" value="<?php if (isset($_POST['Initials'])) echo $_POST['Initials']; ?>" /> </p>
<p><input type="submit" name="submit" value="Register" /></p><input type="hidden" name="submitted" value="TRUE" />
</form>
Any help would be great, i been stuck for hours.
Cheers,
Marty
I'm getting this error:
Fatal error: Call to undefined function escape_data() in C:\wamp\www\registerfe.php on line 8
From this code:
<?php # Script 7.7 - register.php (3rd version after Scripts 7.3 & 7.5)
include ('./projectincludes/header.html');
require_once ('../mysql_connect.php'); // Connect to the db.
$t = escape_data($_POST['Title']); < Line 8
$s = escape_data($_POST['Surname']);
$f = escape_data($_POST['Forename']);
$i = escape_data($_POST['Initials']);
// Make query
$query = "INSERT INTO forensic_entomologist (Fe_ID, Title, Surname, Forename, Initials) VALUES (NULL, $t, $s, $f, $i)";
$result = @mysql_query ($query); // Run the query.
?>
<h2>Register Forensic Entomologist</h2>
<form action="registerfe.php" method="post">
<p>Title: <input type="text" name="Title" size="15" maxlength="10" value="<?php if (isset($_POST['Title'])) echo $_POST['Title']; ?>" /></p>
<p>Surname: <input type="text" name="Surname" size="20" maxlength="25" value="<?php if (isset($_POST['Surname'])) echo $_POST['Surname']; ?>" /></p>
<p>Forename: <input type="text" name="Forename" size="20" maxlength="25" value="<?php if (isset($_POST['Forename'])) echo $_POST['Forename']; ?>" /> </p>
<p>Initials: <input type="text" name="Initials" size="10" maxlength="5" value="<?php if (isset($_POST['Initials'])) echo $_POST['Initials']; ?>" /> </p>
<p><input type="submit" name="submit" value="Register" /></p><input type="hidden" name="submitted" value="TRUE" />
</form>
Any help would be great, i been stuck for hours.
Cheers,
Marty