form that sends data to mysql?
Moderator: General Moderators
still only adds everything except date and time:
Code: Select all
$query = 'IN.SERT INTO news (text, author, email, date, time, title) VALUES(''' . $_POST['text'] .''', ''' . $_POST['author'] .''', ''' . $_POST['email'] . ''', '''. 'NOW()' . ''', '''. 'NOW()' . ''', ''' . $_POST['title'] . ''')';
$result = mysql_query($query,$db);- mudkicker
- Forum Contributor
- Posts: 479
- Joined: Wed Jul 09, 2003 6:11 pm
- Location: Istanbul, TR
- Contact:
Code: Select all
... 'I-N-SERT INTO ...thx
got it by doing
got it by doing
Code: Select all
$query = "INS ERT INTO news (text, author, email, date, time, title) VALUES('". $_POST['text'] ."', '". $_POST['author'] ."', '". $_POST['email'] ."',now(),now(),'".$_POST['title']."');";