Jump to content

a weird problem....


ohdang888

Recommended Posts

In order for isers to see this particular page, they must be logged in, and $user must be set... so thats not thje root of this..

 

The problem is that even if they do not have a row in "settings", its not always inserting it. I set up it to get to see if there is a row, and if it does not, then to inset one. But its not always inserting it!!

 

Any ideas?

 

<?php

$is = mysql_query("SELECT * FROM settings WHERE user_id='$user' ")or die(mysql_error());

if(mysql_num_rows($is) == 0){

mysql_query("INSERT INTO settings (`user_id`, `profile`, `profile_box_header`, `profile_box_border_width`, `profile_box_border_style`)VALUES('$user', 'everyone', 'My Links:', 'none', 'solid') ")or die(mysql_error());

}
?>

Link to comment
https://forums.phpfreaks.com/topic/133802-a-weird-problem/
Share on other sites

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.