show once

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • kiLLeR-eyEd_14
    replied
    Originally posted by anderson View Post
    Old mobiles dont suppot both session n cookie. try logging ur site using a WAP 1.0 phone like Motorola C-168 or MAUE WAP browser. If u can log successfully dont' forget to inform me.
    ======================

    Well, riderz did u get ur solution from this thread? @ riderz
    ok.,then try to use $_REQUEST['PHPSESSID']..Php provides the ses id depending on the browser i think?But, i get a problem with functions like parsepm($msg, $sid)..So i came back to SESSION and COOKIE..I think maui wap browsers have a cookie support?Then cookies will work..And other wap1.0..Unless they don't supp0rt c0okies..

    Leave a comment:


  • anderson
    replied
    Originally posted by kiLLeR-eyEd_14 View Post
    if $_SESSION is not set then i create a cookie and call it with $_COOKIE..That's what i've done in my site..You can also use $_REQUEST['PHPSESSID'] where PHPSESSID is the sessi0n name..To debug, print session_name();
    Old mobiles dont suppot both session n cookie. try logging ur site using a WAP 1.0 phone like Motorola C-168 or MAUE WAP browser. If u can log successfully dont' forget to inform me.
    ======================

    Well, riderz did u get ur solution from this thread? @ riderz

    Leave a comment:


  • kiLLeR-eyEd_14
    replied
    Originally posted by anderson View Post
    Many old mobile phone doesn't support serverside session.
    if $_SESSION is not set then i create a cookie and call it with $_COOKIE..That's what i've done in my site..You can also use $_REQUEST['PHPSESSID'] where PHPSESSID is the sessi0n name..To debug, print session_name();

    Leave a comment:


  • wap2k
    replied
    Originally posted by anderson View Post
    Many old mobile phone doesn't support serverside session.
    I created my own session system for wapside. So i dont really know much about php sessions themselfs.

    Thankyou iv learned something new

    Leave a comment:


  • kiLLeR-eyEd_14
    replied
    Originally posted by anderson View Post
    Many old mobile phone doesn't support serverside session.
    yeh, that's why what i've recommended is much better..Lol

    Leave a comment:


  • anderson
    replied
    Originally posted by wap2k View Post
    I would have said use a session variable set on the register page but maybe the session isnt started intill you log-in!

    Code:
    $_SESSION['first_time'] = 1; // set on the register page
    then

    Code:
    if(isset($_SESSION['first_time'])){ 
    if($uid==$who)
    {
    echo "<br/><b><a href=\"index.php?action=uset&amp;sid=$sid\">[ Edit My  Profile ]</a></b>";
    }
    unset($_SESSION['first_time']); 
    }
    Many old mobile phone doesn't support serverside session.

    Leave a comment:


  • wap2k
    replied
    I would have said use a session variable set on the register page but maybe the session isnt started intill you log-in!

    Code:
    $_SESSION['first_time'] = 1; // set on the register page
    then

    Code:
    if(isset($_SESSION['first_time'])){ 
    if($uid==$who)
    {
    echo "<br/><b><a href=\"index.php?action=uset&amp;sid=$sid\">[ Edit My  Profile ]</a></b>";
    }
    unset($_SESSION['first_time']); 
    }

    Leave a comment:


  • anderson
    replied
    Originally posted by kiLLeR-eyEd_14 View Post
    this isn't a good idea..better to use an sql fetching with something like a row char(1) NOT NULL default '0'..if row is equal to 0 then show link to edit profile..then in the update page, you should query to set the row value into 1..then it will not show again after it was updated..Got my point?
    riders asked for a code that shows the link only for once after registration so I coded in that way. Besides personally I avoid sql as much as I can.

    Leave a comment:


  • kiLLeR-eyEd_14
    replied
    Originally posted by anderson View Post
    You can try like:

    PHP Code:
    $t = mysql_fetch_array(mysql_query("SELECT regtime FROM ibwf_users WHERE id='".$who."' "));
    $rt = $t[0];
    $nt = time() - $rt;
    
    if($nt<300)
    {
    echo "<br/><b><a href=\"index.php?action=uset&amp;sid=$sid\">[ Edit My  Profile ]</a></b>";
    } 
    
    It will show that link up to 5 mins after anyone's registration.
    Tell me if it's working or not.

    @ riderz
    this isn't a good idea..better to use an sql fetching with something like a row char(1) NOT NULL default '0'..if row is equal to 0 then show link to edit profile..then in the update page, you should query to set the row value into 1..then it will not show again after it was updated..Got my point?

    Leave a comment:


  • anderson
    replied
    Originally posted by riderz View Post
    how can i make this code show one time on index

    Code:
    if($uid==$who)
    {
    echo "<br/><b><a href=\"index.php?action=uset&amp;sid=$sid\">[ Edit My  Profile ]</a></b>";
    }
    or how can i make a file to update the profile and make it show only once after registration
    You can try like:

    PHP Code:
    $t = mysql_fetch_array(mysql_query("SELECT regtime FROM ibwf_users WHERE id='".$who."' "));
    $rt = $t[0];
    $nt = time() - $rt;
    
    if($nt<300)
    {
    echo "<br/><b><a href=\"index.php?action=uset&amp;sid=$sid\">[ Edit My  Profile ]</a></b>";
    } 
    
    It will show that link up to 5 mins after anyone's registration.
    Tell me if it's working or not.

    @ riderz
    Last edited by anderson; 05.09.09, 14:45. Reason: sentence edition

    Leave a comment:


  • riderz
    started a topic show once

    show once

    how can i make this code show one time on index

    Code:
    if($uid==$who)
    {
    echo "<br/><b><a href=\"index.php?action=uset&amp;sid=$sid\">[ Edit My  Profile ]</a></b>";
    }
    or how can i make a file to update the profile and make it show only once after registration
Working...
X