Saphira said:IDIDITIDIDITIDIDIT!
PHP:// Find highest answer number. $query = "SELECT MAX(nid) AS Max_nid FROM ".$prefix."news"; $result = mysql_query($query); $Max_nid=@mysql_result($result,"Max_nid"); // add + 1 to highest answer number and keep it in variable name "$Max_id". if there no answer yet set it = 1 if ($result) { $Max_idd = $Max_nid+1; } else { $Max_idd = 1; } $topic = $_POST['topic']; $topic = secure($topic); $detail = $_POST['detail']; $deatil = secure($detail); $name = $_POST['name']; $name = secure($name); $datetime = date('d/m/y h:i:s'); $datetime = secure($datetime); //create date time $topic = addslashes($topic); $detail = addslashes($detail); $query = "INSERT INTO ".$prefix."news(topic, detail, name, nid, datetime) VALUES('".$topic."', '".$detail."', '".$name."', '".$Max_idd."', '".$datetime."')"; $result = mysql_query($query);
I'm like, so happy right now. I was getting sick of writing "I'm testing using apostrophes." lol.
WHO'S THE MAN!
What did you do?
Saphira said:I am male. Saphira is the name of my favourite fictional character of all time. She's the beautiful dragon from Eragon/Eldest/Brisingr. =P
o.0 Boy was I wrong.