Jump to content
Old threads will finally start getting archived ×

evillair

Members
  • Posts

    44
  • Joined

  • Last visited

    Never

About evillair

  • Birthday 01/06/1971

Contact Methods

  • Website URL
    http://evillair.net/v2

Profile Information

  • Gender
    Male
  • Location
    Canada

evillair's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. It may be in the way you are using the $valid_user? I use $_SESSION's for things like this... $sql = mysql_query("SELECT * FROM table_name"); $userinfo = mysql_fetch_array($sql); $_SESSION['user_id'] = $userinfo['user_id']; $test = '001'; // if this works then use an array if ($_SESSION['user_id'] == $test) {...} echo out $valid_user and see shows up too.
  2. You could try: $valid_user_id = array('000','001','002'); if ($valid_user == $valid_user_id) {...}
  3. Have you tried == instead of = ? ($valid_user == array('000','001','002')
  4. I had this problem, this is probably not the best way to do it but... Something like... <?php if (isset($_POST['submited'])) { // Thank you once it IS submitted ?> <h1>Thank you for posting...</h1> blah blah... <?php // If it's not submitted I show the form } else { ?> <!-- Your Form --> <?php } ?> This worked for me.
  5. Have you tried adding a hidden field on your form and check it if was submitted? <input name="is_submitted" type="hidden" value="1"> Then just check if it was submitted or not. $submitted = $_POST['is_submitted']; if ($submitted){ //do your code insert stuff } That might work...
  6. You can try one of these: http://giombetti.com/snippets/5 http://www.codango.com/php/fnc/content/?tree=phpin/codesnips/usermana&id=7278310
×
×
  • 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.