Hello. I have this little form as you can se from “form.php” what i wonder is for “add.php”, what should i have in [B]“$news =;[B]$name = ;
[B]form.php
[code=html]<form enctype=”multipart/form-data” action=”add.php” method=”POST”>
<div align=”center”>
Manga Plum news section<br><br>
<textarea cols=”40″ rows=”5″ name=”news”>
Type your news here
</textarea>
</div>
name: <input type=”text” name=”name” size=”22″><br>
<input type=”submit” value=”Add”>
</p>
</form>
[B]add.php
[code=php]<?php
error_reporting(E_ALL);
//This gets all the other information from the form
$news = ;
$date = date(‘Y-m-d’);
$name = ;
// Connects to your Database
mysql_connect(“localhost”, “user”, “password”) or die(mysql_error()) ;
mysql_select_db(“database”) or die(mysql_error()) ;
//Writes the information to the database
mysql_query(“INSERT INTO `table` VALUES (”,’$news’,’$date’,’$name’)”) or die(mysql_error());
echo “News published and your information has been added to the Database”;
?>