neerajpuri
Members-
Posts
16 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by neerajpuri
-
i m still no table to fetch the value in the cookie................dnt knw what to do.................i think i shud change my whole script...............
-
hi.....i m making the php script for user login n i m geting problem in "remember me" checkbox...........one page is index.php in which the form is made n second pg is process.php which matches uname n pswd with DB.if both matches a cookie is created...............the script is:if(isset($check)){ if(!isset($_COOKIE['MyCookie_$username'])) { setcookie("MyCookie_$username[uname]", $username, time()+3600); setcookie("MyCookie_$username[pswd]", $pswd, time()+3600); }}the $username value comes from the one which user enters...............everything is ok till now but on index page when i try to check if cookie exists n try to retrieve the value of cookie i m not able to retreive the values......in short-remember me is not working...............the coding for cookie in index.php isfunction checkCookie(){var username='MyCookie_'+document.cookie.username+'[uname]';var password='MyCookie_'+document.cookie.username+'[pswd]';if (username!=null && password!=null) { document.write($_COOKIE['MyCookie_'+document.cookie.username+'[pswd]']); }}cookie is the name of form,username is the name of username text box..................i have tried my best to explain the whole thing....................any help is appreciated.............
-
yes it is working......tanx alot
-
ok............anyways tanx fr the timely help
-
ya thats working hwever this is not what i want............i js want that single click on back button shud work......................is there any alternative to this redirect page
-
hi,i wana use rss in my website................hw do i make the php page in which it wud fetch the articles from the dBase.i mean whether i shud make php page n include xml tag in that(but dnt knw hw) or is there any other way.............i tried my best to explain the things in the easiest way.................any help wub b apreciated
-
y dont u try cookies
-
hi....whenever i redirect my one php page to other and then when i run the page the back button on internet explore doesn't work............i cannt go back to the previous page then...........is there any solution or any alternative to this.
-
ok.....tanx....ya my prob is solved nw..........hwever y that *sigh* was there ............anyways tanx alot justsomeguy and shiftJIS.
-
$something = mysql_query("SELECT fishy FROM table WHERE id = SOMEID");echo $something; //...IS NOT WHAT YOU WANT. Outputs something like : mysql_resource id#$row = mysql_fetch_assoc($something);echo $row; //... IS NOT WHAT YOU WANT. Outputs something like : array()echo $row['fishy']; //..IS THE VALUE YOU WANT. Outputs : Red Snapper[/code]------------------------------------------------------------------c its js last 30-40 i've been wrking in php.so these silly mistakes r but obvious.....hwever if we cm back to the code .......y do v need to echo the result of the rows........because i js have to save the uname and pswd in cookies so that they can retrieve them in future................ $something = mysql_query("SELECT fishy FROM table WHERE id = SOMEID");echo $something; //...IS NOT WHAT YOU WANT. Outputs something like : mysql_resource id#$row = mysql_fetch_assoc($something);echo $row; //... IS NOT WHAT YOU WANT. Outputs something like : array()echo $row['fishy']; //..IS THE VALUE YOU WANT. Outputs : Red Snapper[/code]------------------------------------------------------------------c its js last 30-40 days i've been wrking in php.so these silly mistakes r but obvious.....hwever if we cm back to the code .......y do v need to echo the result of the rows........because i js have to save the uname and pswd in cookies so that they can retrieve them in future................
-
ok.....Here is the code.if(isset($remember)){ setcookie("rmbr_uname", $uname,time()+60*60*24*30); setcookie("rmbr_pswd", $pswd,time()+60*60*24*30);}include "dbconn.php"; $match=mysql_query("Select uname from userinfo where uname='$uname' && pswd='$pswd'");$unm=mysql_num_rows("$match");if($unm>=1){ if(isset($_COOKIE['rmbr_uname'], $_COOKIE['rmbr_pswd'])){ $user = mysql_query('SELECT uname FROM userinfo WHERE uname=?', $_COOKIE['rmbr_uname']); if($user) { $check_pass = mysql_query('SELECT pswd FROM userinfo WHERE pswde=?', $_COOKIE['rmbr_pswd']); //$check_pass = sha1( sha1($user['uname']) ); if($check_pass == $_COOKIE['rmbr_pswd']) { -----------------sessions part----------- } remember is the name of the check box n i hv fetched the value thru $remember=$_POST['remember'];at the top of the page.
-
i m making one of the login page in php..............i m geting problem in setting cookie for "remember me" chack box................can anybody help me out..............
-
ok i'l use xslt....tanx alot
-
ok......tanx..........i'l try that
-
hii m new to php....so getting lots of problemsI want less database interaction in my portal......the thing is i wana use xml.......i want the same thing which is done in ibnlive.com site......the data is fetched thru xml n then converted to html page n the page is called by the unique autogenerated id.........i m using php.............i think it is parsing of xml pages but no exact idea............hw do i do that........