nope same error

nope same error
.:.:#14:.:. .:.: Impossible Is Nothing :.:. .:.: 845 Rep:.:.
.:.: Stand up for what is right, even if you stand alone:.:.
Try this;
PHP Code:<center>
<?php
// set your infomation.
$dbhost='localhost';
$dbusername='';
$dbuserpass='';
$dbname = '';
// connect to the mysql database server.
mysql_connect ($dbhost, $dbusername, $dbuserpass);
//select the database
mysql_select_db($dbname) or die('Cannot select database');
if ($_POST['name']) {
$name = $_POST['name'];
if ($_POST['about']) {
$about = $_POST['about'];
if ($_POST['url']) {
$about = $_POST['url'];
$query = "INSERT INTO search (name,about,url) VALUES ('".$name."','".$about."','".$url."')";
mysql_query($query)or die(mysql_error());
echo $name." was inserted successfully";
}else{
echo "About was left blank";
}
}
}
?>
<h2>Add</h2>
<form action='add.php' method='POST'>
Name: <input type='text' name='name' size='33' /><br />
Url: <input type='text' name='url' size='33' /><br />
about: <textarea name='about' cols='25' rows='5'/></textarea><br />
<input type='submit' value='Add!' />
</form>
<a href="search.php">Search for a website.</a>
</center>
cool worked i think +rep
.:.:#14:.:. .:.: Impossible Is Nothing :.:. .:.: 845 Rep:.:.
.:.: Stand up for what is right, even if you stand alone:.:.
np
also for future referance $end means its missing a } from the end of the php script.
I knew that ^^
Want to hide these adverts? Register an account for free!