Jump to content

neerajpuri

Members
  • Posts

    16
  • Joined

  • Last visited

neerajpuri's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. neerajpuri

    cookies

    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...............
  2. neerajpuri

    cookies

    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.............
  3. yes it is working......tanx alot
  4. ok............anyways tanx fr the timely help
  5. 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
  6. neerajpuri

    rss 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
  7. 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.
  8. ok.....tanx....ya my prob is solved nw..........hwever y that *sigh* was there ............anyways tanx alot justsomeguy and shiftJIS.
  9. $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................
  10. 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.
  11. 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..............
  12. ok i'l use xslt....tanx alot
  13. ok......tanx..........i'l try that
×
×
  • Create New...