Jump to content

[SOLVED] check if already posted..


abs0lut

Recommended Posts

If u have a user based site, u can save the "already_posted" as a database field. If not u can only count on pure sessions and cookies which can be deleted. You are most surely destroying all your session variables when logging out, thats why the form appears again. A cookie would be more appropriate in this case, but they can be always deleted.

echo "<input type=\"text\" name=\"cost[]\" /><br>";

for ($i=0; $i<count($niqid); $i++) {

 

    $query = "INSERT INTO ctable (userid, name, cost, total, date, postid)

              VALUES ('$userid', '".$niqid[$i]."', '".$cost[$i]."', '$total', '$date', '$post')";

    $sql = mysql_query($query) or die (mysql_error());

}

I want the input form cost to disappear if he posted already. please help me..

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.