Jump to content

Search the Community

Showing results for tags 'setcookie'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 1 result

  1. Everything works except the cookies are not being set, any ideas?, Error reporting is that headers have already been set, I don't see it $uname = $_REQUEST["uname"]; $upass = $_REQUEST["upass"]; $ref = $_REQUEST["ref"]; $uname = str_replace("&", "'", $uname); $uname = str_replace("'", """, $uname); $uname = str_replace("\"", "\", $uname); $uname = str_replace("+", "+", $uname); $upass = str_replace("&", "'", $upass); $upass = str_replace("'", """, $upass); $upass = str_replace("\"", "\", $upass); $upass = str_replace("+", "+", $upass); If ($uname != NULL) { $username="xxxx"; $password="xxxx"; $database="xxxx"; $server="xxxx"; mysql_connect($server,$username,$password); @mysql_select_db($database) or die("Something is broken and needs fixing. Please contact us <a href=\"http://xxxx/contact..../contact.php\"> and report this</a>"); $sqlq="SELECT * FROM xxxx WHERE xxxx = '".$uname."' AND xxxx = '".$upass."' LIMIT 0,1"; $objRS = mysql_query($sqlq); while($row = mysql_fetch_array($objRS, MYSQL_ASSOC)){ $uname = $row["xxxx"]; $suid = $row["xxxx"]; $sname = $row["xxxx"]; $upass = $row["xxxxx"]; } $rows = mysql_num_rows($objRS); if (empty($rows)) { $title = "Log In"; include ("../navigation/header.php"); ?> <div id="contenti"> <div id="contwrap"> <div id="iwrap1"> <? ?> <h2> Log In Failed</h2> The username or password is incorrect, please try again <? } else { setcookie("suid",$suid, time()+14400); setcookie("aka",$sname, time()+14400); setcookie("logged","yes", time()+14400); $title = "Log In"; include ("../navigation/header.php"); ?> <div id="contenti"> <div id="contwrap"> <div id="iwrap1"> <? echo "You have succesfully logged in. <a href=\"".$ref."\">Click here to return to the previous page</a>"; } } else { header( 'Location: ../index.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.