You need a database connection prior to the functions..
$query = dbconnect(“select ‘test’;”);
(where dbconnect is a function to connect to the DB and “select ‘test’” is just a random query)
Ex:
<?php
if (isset($_POST[‘submit’])){
$query = dbconnect(“select ‘test’;”);$forename = mysql_real_escape_string(htmlspecialchars($_POST[‘forename’]));
etc…