Jump to content

memfiss

Members
  • Posts

    30
  • Joined

  • Last visited

    Never

Posts posted by memfiss

  1. id should automaticaly generate  mysql

    u should make ur `userid` like that

    create `sometable` (
    `userID`smallint(5) NOT NULL auto_increment,
    ... some other fields ... ,
    PRIMARY KEY  (`userID`) 
    )
    

    then when u will run

    mysql_query("INSERT INTO users ( email, password, mobile)
                                    VALUES ('$email','$password','$mobile')");

    id will be 1 , next accaunt will have 2 , then 3 ... 99999

  2. wtf is it ?

    if(!isset($_SESSION['cart'] = $new))
    #php makes ur code step by step 
    #first step
    $_SESSION['cart'] = $new
    #where is $new variable ?
    #if no varable $_SESSION['cart'] will be null
    #then we check
    if (!isset(null))
    #its true
    if (true)
    $_SESSION['cart'] = $new;
    #and again $_SESSION['cart'] will be null

    where is declarated $new variable ?

  3. ur $_SESSION['uid'] doesn't isset , u should check it

    <?php
    session_start();
    mysql_connect("localhost","root","");
    mysql_select_db("news_system");
            if (!isset($_SESSION['uid'])) $_SESSION['uid'] = null;
    

  4. u make output

     

    echo "<p>logged in as: ". $_SESSION['login'];

    then u are using header in ur function

    try to replace them

    session_start();
    if(isset($_SESSION['login']) && isset($_SESSION['password'])) {
    	checkdate();
    	include ('header.php');		
    	echo "<p>logged in as: ". $_SESSION['login'];			
    	include ('footer.php');
    
    	}
    ...
    

×
×
  • 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.