Originally posted by anderson
View Post
show once
Collapse
X
-
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..
-
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.Originally posted by kiLLeR-eyEd_14 View Postif $_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();
======================
Well, riderz did u get ur solution from this thread? @ riderz
Leave a comment:
-
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();Originally posted by anderson View PostMany old mobile phone doesn't support serverside session.
Leave a comment:
-
yeh, that's why what i've recommended is much better..LolOriginally posted by anderson View PostMany old mobile phone doesn't support serverside session.
Leave a comment:
-
Many old mobile phone doesn't support serverside session.Originally posted by wap2k View PostI would have said use a session variable set on the register page but maybe the session isnt started intill you log-in!
thenCode:$_SESSION['first_time'] = 1; // set on the register page
Code:if(isset($_SESSION['first_time'])){ if($uid==$who) { echo "<br/><b><a href=\"index.php?action=uset&sid=$sid\">[ Edit My Profile ]</a></b>"; } unset($_SESSION['first_time']); }
Leave a comment:
-
I would have said use a session variable set on the register page but maybe the session isnt started intill you log-in!
thenCode:$_SESSION['first_time'] = 1; // set on the register page
Code:if(isset($_SESSION['first_time'])){ if($uid==$who) { echo "<br/><b><a href=\"index.php?action=uset&sid=$sid\">[ Edit My Profile ]</a></b>"; } unset($_SESSION['first_time']); }
Leave a comment:
-
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.Originally posted by kiLLeR-eyEd_14 View Postthis 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:
-
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?Originally posted by anderson View PostYou can try like:
It will show that link up to 5 mins after anyone's registration.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&sid=$sid\">[ Edit My Profile ]</a></b>"; }
Tell me if it's working or not.
@ riderz
Leave a comment:
-
You can try like:Originally posted by riderz View Posthow can i make this code show one time on index
or how can i make a file to update the profile and make it show only once after registrationCode:if($uid==$who) { echo "<br/><b><a href=\"index.php?action=uset&sid=$sid\">[ Edit My Profile ]</a></b>"; }
It will show that link up to 5 mins after anyone's registration.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&sid=$sid\">[ Edit My Profile ]</a></b>"; }
Tell me if it's working or not.
@ riderz
Leave a comment:
-
show once
how can i make this code show one time on index
or how can i make a file to update the profile and make it show only once after registrationCode:if($uid==$who) { echo "<br/><b><a href=\"index.php?action=uset&sid=$sid\">[ Edit My Profile ]</a></b>"; }Tags: None
Leave a comment: