I am having some difficulty in using functions. If I use the following code with an include() command, it works just fine, but if i declare it in a function and call the function, it does not work. An anyone explain?
Here's the code:
if (!isset($name)&&!isset($email)){
echo "<br><font size=+1>Add User</font>";
echo "<table border=1 bordercolor=\"#000000\" align=\"center\" cellpadding=0 cellspacing=0 width=50%>";
echo "<form method=post action=\"index.php?page=add\">";
echo "<tr><td align=\"center\">Name:</td><td align=\"left\"> <input type=text name=name class=input1></td></tr><tr><td align=\"center\">Email:</td><td align=\"left\"> <input type=text name=email class=input1> <input type=image src=\"ok.gif\"></td></tr></form></table>";}
else {
$Query = "INSERT INTO phpmailer VALUES(NULL,NULL,'$name','$email')";
$Results = mysql_query($Query);
echo "<br><p>Successfully Added $name & $email to the databse.";}