Jump to content

Pi_Mastuh

Members
  • Posts

    233
  • Joined

  • Last visited

    Never

Everything posted by Pi_Mastuh

  1. I tried that, it wasn't working either.
  2. Here's all of my code [code]<?php //Create the cookie after the user logs in setcookie("preuserID", $_SESSION['preuserID'], time()+60*60*24*100, "/");       setcookie("preuserName", $_SESSION['preuserName'], time()+60*60*24*100, "/");   header("Location: ../home.php");[/code] [code]<?php   // Check if user has been remembered and re-direct   if(isset($_COOKIE['preuserID']) && isset($_COOKIE['preuserName'])){       $_SESSION['preuserID'] = $_COOKIE['preuserID'];       $_SESSION['preuserName'] = $_COOKIE['preuserName'];   header("Location: ../reg/home.php");   }[/code] [code]<?php //Log the user out unset($_COOKIE['preuserID']); unset($_COOKIE['preuserName']);[/code]
  3. Did I do something wrong? I put it on the logout page. The logout page re-directs to the main index.php page, which re-directs to home.php IF it finds the cookies. I hit logout and it's just going to home.php, but it shouldn't be finding the cookies.
  4. so it would be unset($_COOKIE['preuserID']); unset($_COOKIE['preuserName']); ?
  5. I've got a code that creates cookies to keep a user logged in, but how do I delete them for if they want to logout? If the cookie is found it re-directs to another page and I tried setting new cookies to expire an hour ago but it's not deleting the old one, which keeps the user from logging out. Here's my code: [code] <?php if(isset($_COOKIE['preuserID']) && isset($_COOKIE['preuserName'])){       $_SESSION['preuserID'] = $_COOKIE['preuserID'];       $_SESSION['preuserName'] = $_COOKIE['preuserName'];   header("Location: ../reg/home.php");   }[/code]
  6. So I would put it on the page it's supposed to re-direct to?
  7. What does that do? And which page would I add it to?
  8. I guess I'm not. How do I?
  9. I'm trying to make this page either find the cookie and re-direct, or show the content. But it's just blank. Anyone know? [code]<?php function checkLogin(){   // Check if user has been remembered   if(isset($_COOKIE['preuserID']) && isset($_COOKIE['preuserName'])){       $_SESSION['preuserID'] = $_COOKIE['preuserID'];       $_SESSION['preuserName'] = $_COOKIE['preuserName'];   header("Location: ../home.php");   }   else   { ?> <html> <head> <meta http-equiv="Content-Language" content="en-us"> <TITLE>Welcome to Net-Petz! ~ Home</TITLE> <META NAME="Description" CONTENT="Net-Petz is the newest virtual pet site on the internet. It has fun games, lots of cool petz to adopt, and tons of awesome items! It's completely free!"> <META NAME="Keywords" CONTENT="petz net virtual pets pet fun games, game, "> <script language="JavaScript" fptype="dynamicanimation"> <!-- function dynAnimation() {} function clickSwapImg() {} //--> </script> <script language="JavaScript1.2" fptype="dynamicanimation" src="animate.js"> </script> <style type="text/css"> <!-- .style3 {font-family: Arial, Helvetica, sans-serif} --> </style> </head> <body onLoad="dynAnimation()"> <div align="center">   <table border="1" cellspacing="1" bordercolor="#FFFFFF" width="1%" id="AutoNumber1" height="838" align="left">     <tr>       <td width="100%" height="90" colspan="2" align="center" valign="top" bordercolor="#FFFFFF" bordercolorlight="#FFFFFF" bordercolordark="#FFFFFF">       <p>       <img border="0" src="all_n.jpg" width="1024" height="91"></td>     </tr>     <tr>       <td width="12%" height="747" align="center" valign="top" bordercolor="#FFFFFF">       <p>       <img border="0" src="titleexplore.jpg" width="130" height="22"><br>       <a onMouseOver="document['fpAnimswapImgFP21'].imgRolln=document['fpAnimswapImgFP21'].src;document['fpAnimswapImgFP21'].src=document['fpAnimswapImgFP21'].lowsrc;" onMouseOut="document['fpAnimswapImgFP21'].src=document['fpAnimswapImgFP21'].imgRolln" href="oops.php">       <img border="0" src="world1.jpg" id="fpAnimswapImgFP21" name="fpAnimswapImgFP21" dynamicanimation="fpAnimswapImgFP21" lowsrc="world2.jpg" width="130" height="22"></a><br>       <a onMouseOver="document['fpAnimswapImgFP22'].imgRolln=document['fpAnimswapImgFP22'].src;document['fpAnimswapImgFP22'].src=document['fpAnimswapImgFP22'].lowsrc;" onMouseOut="document['fpAnimswapImgFP22'].src=document['fpAnimswapImgFP22'].imgRolln" href="oops.php">       <img border="0" src="market1.jpg" id="fpAnimswapImgFP22" name="fpAnimswapImgFP22" dynamicanimation="fpAnimswapImgFP22" lowsrc="market2.jpg" width="130" height="22"></a><br>       <img border="0" src="titlefun.jpg" width="130" height="22"><br>       <a onMouseOver="document['fpAnimswapImgFP23'].imgRolln=document['fpAnimswapImgFP23'].src;document['fpAnimswapImgFP23'].src=document['fpAnimswapImgFP23'].lowsrc;" onMouseOut="document['fpAnimswapImgFP23'].src=document['fpAnimswapImgFP23'].imgRolln" href="oops.php">       <img border="0" src="games1.jpg" id="fpAnimswapImgFP23" name="fpAnimswapImgFP23" dynamicanimation="fpAnimswapImgFP23" lowsrc="games2.jpg" width="130" height="22"></a><br>       <a onMouseOver="document['fpAnimswapImgFP24'].imgRolln=document['fpAnimswapImgFP24'].src;document['fpAnimswapImgFP24'].src=document['fpAnimswapImgFP24'].lowsrc;" onMouseOut="document['fpAnimswapImgFP24'].src=document['fpAnimswapImgFP24'].imgRolln" href="oops.php">       <img border="0" src="boards1.jpg" id="fpAnimswapImgFP24" name="fpAnimswapImgFP24" dynamicanimation="fpAnimswapImgFP24" lowsrc="boards2.jpg" width="130" height="22"></a><br>       <a onMouseOver="document['fpAnimswapImgFP25'].imgRolln=document['fpAnimswapImgFP25'].src;document['fpAnimswapImgFP25'].src=document['fpAnimswapImgFP25'].lowsrc;" onMouseOut="document['fpAnimswapImgFP25'].src=document['fpAnimswapImgFP25'].imgRolln" href="javascript:void(0)">       <img border="0" src="images/Sidebar%20&%20Layout/mail1.jpg" id="fpAnimswapImgFP25" name="fpAnimswapImgFP25" dynamicanimation="fpAnimswapImgFP25" lowsrc="images/Sidebar%20&%20Layout/mail2.jpg" width="130" height="22"></a><br>       <a onMouseOver="document['fpAnimswapImgFP26'].imgRolln=document['fpAnimswapImgFP26'].src;document['fpAnimswapImgFP26'].src=document['fpAnimswapImgFP26'].lowsrc;" onMouseOut="document['fpAnimswapImgFP26'].src=document['fpAnimswapImgFP26'].imgRolln" href="stuff.php">       <img border="0" src="stuff1.jpg" id="fpAnimswapImgFP26" name="fpAnimswapImgFP26" dynamicanimation="fpAnimswapImgFP26" lowsrc="stuff2.jpg" width="130" height="22"></a><br>       <img border="0" src="titlemisc.jpg" width="130" height="22"><br>       <a onMouseOver="document['fpAnimswapImgFP27'].imgRolln=document['fpAnimswapImgFP27'].src;document['fpAnimswapImgFP27'].src=document['fpAnimswapImgFP27'].lowsrc;" onMouseOut="document['fpAnimswapImgFP27'].src=document['fpAnimswapImgFP27'].imgRolln" href="login.php">       <img border="0" src="in1.jpg" id="fpAnimswapImgFP27" name="fpAnimswapImgFP27" dynamicanimation="fpAnimswapImgFP27" lowsrc="in2.jpg" width="130" height="22"></a><br>       <a onMouseOver="document['fpAnimswapImgFP28'].imgRolln=document['fpAnimswapImgFP28'].src;document['fpAnimswapImgFP28'].src=document['fpAnimswapImgFP28'].lowsrc;" onMouseOut="document['fpAnimswapImgFP28'].src=document['fpAnimswapImgFP28'].imgRolln" href="logout.php">       <img border="0" src="out1.jpg" id="fpAnimswapImgFP28" name="fpAnimswapImgFP28" dynamicanimation="fpAnimswapImgFP28" lowsrc="out2.jpg" width="130" height="22"></a><br>       <a onMouseOver="document['fpAnimswapImgFP29'].imgRolln=document['fpAnimswapImgFP29'].src;document['fpAnimswapImgFP29'].src=document['fpAnimswapImgFP29'].lowsrc;" onMouseOut="document['fpAnimswapImgFP29'].src=document['fpAnimswapImgFP29'].imgRolln" href="help.php">       <img border="0" src="help1.jpg" id="fpAnimswapImgFP29" name="fpAnimswapImgFP29" dynamicanimation="fpAnimswapImgFP29" lowsrc="help2.jpg" width="130" height="22"></a><br>       <a onMouseOver="document['fpAnimswapImgFP30'].imgRolln=document['fpAnimswapImgFP30'].src;document['fpAnimswapImgFP30'].src=document['fpAnimswapImgFP30'].lowsrc;" onMouseOut="document['fpAnimswapImgFP30'].src=document['fpAnimswapImgFP30'].imgRolln" href="contact.php">       <img border="0" src="contact1.jpg" id="fpAnimswapImgFP30" name="fpAnimswapImgFP30" dynamicanimation="fpAnimswapImgFP30" lowsrc="contact2.jpg" width="130" height="22"></a></p>       <div align="center" style="width: 130; height: 176">         <center>         <table border="3" cellspacing="1" bordercolor="#000099" width="100%" id="AutoNumber2" height="253">           <tr>             <td width="100%" height="126" align="center" bordercolor="#000099">             <font color="#000099">           <? print "Hi $preuserName!"; ?></font></b><br>             <b>             <font color="#000099"><? print "$points Net-Pointz."; ?></font></td>           </tr>           <tr>             <td width="100%" height="127" align="center" bordercolor="#000099">             <a style="text-decoration: none" dynamicanimation="fpAnimformatRolloverFP1" fprolloverstyle="color: #FF0000; text-decoration: overline underline; font-weight: bold" onMouseOver="rollIn(this)" onMouseOut="rollOut(this)" language="Javascript1.2" href="oops.php">My Petz</a><br>             <a style="text-decoration: none" dynamicanimation="fpAnimformatRolloverFP1" fprolloverstyle="color: #FF0000; text-decoration: overline underline; font-weight: bold" onMouseOver="rollIn(this)" onMouseOut="rollOut(this)" language="Javascript1.2" href="oops.php">My Inventory</a></td>           </tr>         </table>         </center>       </div>       <p><br>       <br> &nbsp;</td>       <td width="88%" height="747" align="center" valign="top">       &nbsp;<table border="4" cellspacing="1" width="67%" id="AutoNumber3" bordercolorlight="#000099" bordercolordark="#000099">         <tr>           <td width="100%" bordercolorlight="#000099" bordercolordark="#000099">           <img border="0" src="Welcome%20logo.gif" width="618" height="44"></td>         </tr>       </table>       <p>Net-Petz is the newest virtual pet site on the internet. It's filled       with cool petz, fun games, exciting places, and much more. It's free to       sign up so what are you waiting for?       <a style="text-decoration: none" dynamicanimation="fpAnimformatRolloverFP1" fprolloverstyle="color: #FF0000; text-decoration: overline underline; font-weight: bold" onMouseOver="rollIn(this)" onMouseOut="rollOut(this)" language="Javascript1.2" href="register.php">       Click Here</a> to Sign Up. Already a member? Then       <a href="login.php" style="text-decoration: none" dynamicanimation="fpAnimformatRolloverFP1" fprolloverstyle="text-decoration: overline underline; color: #FF0000; font-weight: bold" onMouseOver="rollIn(this)" onMouseOut="rollOut(this)" language="Javascript1.2">       Click Here</a> to login.</p>       <p><b>Net-Petz is best viewed in Internet Explorer and looks bad on       Firefox. I'm trying to fix it but I'm new at Firefox. It's best to use       Internet Explorer. We have a really cool layout that doesn't work in FF       ;_;.</b><br>       </p>       <table border="4" cellspacing="1" width="706" id="AutoNumber4" height="1" bordercolorlight="#000099" bordercolordark="#000099">         <tr>           <td bordercolorlight="#000099" bordercolordark="#000099" align="left" valign="top" width="697" height="5" colspan="2">           <p align="center"><font size="5" face="Comic Sans MS" color="#000099">           News</font></td>         </tr>         <tr>           <td bordercolorlight="#000099" bordercolordark="#000099" align="left" valign="top" width="358" height="91">               <p align="center"><u><b>20th in the Month of the Dragonous ~ Lookup Customization </b></u></p>               <p align="center">You can now customize your lookup! :D Not excesssivly with code or anything, but you can select background, text, and table colors for your page and also add a description and image. Links to edit your lookup can be found on the lookups page. Enjoy the update ^_^.</p>               <p align="center">~Evil Programmer of DOOM (Lynsey)  </p></td>           <td bordercolorlight="#000099" bordercolordark="#000099" align="center" width="339" height="91">           <img border="0" src="welcome.jpg" width="300" height="300"></td>         </tr>         </table>       <p>       <br>       </td>     </tr>   </table> </div> </body> </html> <?php } } ?>[/code]
  10. Now the page is just blank and not re-directing. [code]<?php function checkLogin(){   /* Check if user has been remembered */   if(isset($_COOKIE['preuserID']) && isset($_COOKIE['preuserName'])){       $_SESSION['preuserID'] = $_COOKIE['preuserID'];       $_SESSION['preuserName'] = $_COOKIE['preuserName'];     header("Location:/reg/home.php");   }   else   { ?> <html> <head> <meta http-equiv="Content-Language" content="en-us"> <TITLE>Welcome to Net-Petz! ~ Home</TITLE> <META NAME="Description" CONTENT="Net-Petz is the newest virtual pet site on the internet. It has fun games, lots of cool petz to adopt, and tons of awesome items! It's completely free!"> <META NAME="Keywords" CONTENT="petz net virtual pets pet fun games, game, "> <script language="JavaScript" fptype="dynamicanimation"> <!-- function dynAnimation() {} function clickSwapImg() {} //--> </script> <script language="JavaScript1.2" fptype="dynamicanimation" src="animate.js"> </script> <style type="text/css"> <!-- .style3 {font-family: Arial, Helvetica, sans-serif} --> </style> </head> <body onLoad="dynAnimation()"> <div align="center">   <table border="1" cellspacing="1" bordercolor="#FFFFFF" width="1%" id="AutoNumber1" height="838" align="left">     <tr>       <td width="100%" height="90" colspan="2" align="center" valign="top" bordercolor="#FFFFFF" bordercolorlight="#FFFFFF" bordercolordark="#FFFFFF">       <p>       <img border="0" src="all_n.jpg" width="1024" height="91"></td>     </tr>     <tr>       <td width="12%" height="747" align="center" valign="top" bordercolor="#FFFFFF">       <p>       <img border="0" src="titleexplore.jpg" width="130" height="22"><br>       <a onMouseOver="document['fpAnimswapImgFP21'].imgRolln=document['fpAnimswapImgFP21'].src;document['fpAnimswapImgFP21'].src=document['fpAnimswapImgFP21'].lowsrc;" onMouseOut="document['fpAnimswapImgFP21'].src=document['fpAnimswapImgFP21'].imgRolln" href="oops.php">       <img border="0" src="world1.jpg" id="fpAnimswapImgFP21" name="fpAnimswapImgFP21" dynamicanimation="fpAnimswapImgFP21" lowsrc="world2.jpg" width="130" height="22"></a><br>       <a onMouseOver="document['fpAnimswapImgFP22'].imgRolln=document['fpAnimswapImgFP22'].src;document['fpAnimswapImgFP22'].src=document['fpAnimswapImgFP22'].lowsrc;" onMouseOut="document['fpAnimswapImgFP22'].src=document['fpAnimswapImgFP22'].imgRolln" href="oops.php">       <img border="0" src="market1.jpg" id="fpAnimswapImgFP22" name="fpAnimswapImgFP22" dynamicanimation="fpAnimswapImgFP22" lowsrc="market2.jpg" width="130" height="22"></a><br>       <img border="0" src="titlefun.jpg" width="130" height="22"><br>       <a onMouseOver="document['fpAnimswapImgFP23'].imgRolln=document['fpAnimswapImgFP23'].src;document['fpAnimswapImgFP23'].src=document['fpAnimswapImgFP23'].lowsrc;" onMouseOut="document['fpAnimswapImgFP23'].src=document['fpAnimswapImgFP23'].imgRolln" href="oops.php">       <img border="0" src="games1.jpg" id="fpAnimswapImgFP23" name="fpAnimswapImgFP23" dynamicanimation="fpAnimswapImgFP23" lowsrc="games2.jpg" width="130" height="22"></a><br>       <a onMouseOver="document['fpAnimswapImgFP24'].imgRolln=document['fpAnimswapImgFP24'].src;document['fpAnimswapImgFP24'].src=document['fpAnimswapImgFP24'].lowsrc;" onMouseOut="document['fpAnimswapImgFP24'].src=document['fpAnimswapImgFP24'].imgRolln" href="oops.php">       <img border="0" src="boards1.jpg" id="fpAnimswapImgFP24" name="fpAnimswapImgFP24" dynamicanimation="fpAnimswapImgFP24" lowsrc="boards2.jpg" width="130" height="22"></a><br>       <a onMouseOver="document['fpAnimswapImgFP25'].imgRolln=document['fpAnimswapImgFP25'].src;document['fpAnimswapImgFP25'].src=document['fpAnimswapImgFP25'].lowsrc;" onMouseOut="document['fpAnimswapImgFP25'].src=document['fpAnimswapImgFP25'].imgRolln" href="javascript:void(0)">       <img border="0" src="images/Sidebar%20&%20Layout/mail1.jpg" id="fpAnimswapImgFP25" name="fpAnimswapImgFP25" dynamicanimation="fpAnimswapImgFP25" lowsrc="images/Sidebar%20&%20Layout/mail2.jpg" width="130" height="22"></a><br>       <a onMouseOver="document['fpAnimswapImgFP26'].imgRolln=document['fpAnimswapImgFP26'].src;document['fpAnimswapImgFP26'].src=document['fpAnimswapImgFP26'].lowsrc;" onMouseOut="document['fpAnimswapImgFP26'].src=document['fpAnimswapImgFP26'].imgRolln" href="stuff.php">       <img border="0" src="stuff1.jpg" id="fpAnimswapImgFP26" name="fpAnimswapImgFP26" dynamicanimation="fpAnimswapImgFP26" lowsrc="stuff2.jpg" width="130" height="22"></a><br>       <img border="0" src="titlemisc.jpg" width="130" height="22"><br>       <a onMouseOver="document['fpAnimswapImgFP27'].imgRolln=document['fpAnimswapImgFP27'].src;document['fpAnimswapImgFP27'].src=document['fpAnimswapImgFP27'].lowsrc;" onMouseOut="document['fpAnimswapImgFP27'].src=document['fpAnimswapImgFP27'].imgRolln" href="login.php">       <img border="0" src="in1.jpg" id="fpAnimswapImgFP27" name="fpAnimswapImgFP27" dynamicanimation="fpAnimswapImgFP27" lowsrc="in2.jpg" width="130" height="22"></a><br>       <a onMouseOver="document['fpAnimswapImgFP28'].imgRolln=document['fpAnimswapImgFP28'].src;document['fpAnimswapImgFP28'].src=document['fpAnimswapImgFP28'].lowsrc;" onMouseOut="document['fpAnimswapImgFP28'].src=document['fpAnimswapImgFP28'].imgRolln" href="logout.php">       <img border="0" src="out1.jpg" id="fpAnimswapImgFP28" name="fpAnimswapImgFP28" dynamicanimation="fpAnimswapImgFP28" lowsrc="out2.jpg" width="130" height="22"></a><br>       <a onMouseOver="document['fpAnimswapImgFP29'].imgRolln=document['fpAnimswapImgFP29'].src;document['fpAnimswapImgFP29'].src=document['fpAnimswapImgFP29'].lowsrc;" onMouseOut="document['fpAnimswapImgFP29'].src=document['fpAnimswapImgFP29'].imgRolln" href="help.php">       <img border="0" src="help1.jpg" id="fpAnimswapImgFP29" name="fpAnimswapImgFP29" dynamicanimation="fpAnimswapImgFP29" lowsrc="help2.jpg" width="130" height="22"></a><br>       <a onMouseOver="document['fpAnimswapImgFP30'].imgRolln=document['fpAnimswapImgFP30'].src;document['fpAnimswapImgFP30'].src=document['fpAnimswapImgFP30'].lowsrc;" onMouseOut="document['fpAnimswapImgFP30'].src=document['fpAnimswapImgFP30'].imgRolln" href="contact.php">       <img border="0" src="contact1.jpg" id="fpAnimswapImgFP30" name="fpAnimswapImgFP30" dynamicanimation="fpAnimswapImgFP30" lowsrc="contact2.jpg" width="130" height="22"></a></p>       <div align="center" style="width: 130; height: 176">         <center>         <table border="3" cellspacing="1" bordercolor="#000099" width="100%" id="AutoNumber2" height="253">           <tr>             <td width="100%" height="126" align="center" bordercolor="#000099">             <font color="#000099">           <? print "Hi $preuserName!"; ?></font></b><br>             <b>             <font color="#000099"><? print "$points Net-Pointz."; ?></font></td>           </tr>           <tr>             <td width="100%" height="127" align="center" bordercolor="#000099">             <a style="text-decoration: none" dynamicanimation="fpAnimformatRolloverFP1" fprolloverstyle="color: #FF0000; text-decoration: overline underline; font-weight: bold" onMouseOver="rollIn(this)" onMouseOut="rollOut(this)" language="Javascript1.2" href="oops.php">My Petz</a><br>             <a style="text-decoration: none" dynamicanimation="fpAnimformatRolloverFP1" fprolloverstyle="color: #FF0000; text-decoration: overline underline; font-weight: bold" onMouseOver="rollIn(this)" onMouseOut="rollOut(this)" language="Javascript1.2" href="oops.php">My Inventory</a></td>           </tr>         </table>         </center>       </div>       <p><br>       <br> &nbsp;</td>       <td width="88%" height="747" align="center" valign="top">       &nbsp;<table border="4" cellspacing="1" width="67%" id="AutoNumber3" bordercolorlight="#000099" bordercolordark="#000099">         <tr>           <td width="100%" bordercolorlight="#000099" bordercolordark="#000099">           <img border="0" src="Welcome%20logo.gif" width="618" height="44"></td>         </tr>       </table>       <p>Net-Petz is the newest virtual pet site on the internet. It's filled       with cool petz, fun games, exciting places, and much more. It's free to       sign up so what are you waiting for?       <a style="text-decoration: none" dynamicanimation="fpAnimformatRolloverFP1" fprolloverstyle="color: #FF0000; text-decoration: overline underline; font-weight: bold" onMouseOver="rollIn(this)" onMouseOut="rollOut(this)" language="Javascript1.2" href="register.php">       Click Here</a> to Sign Up. Already a member? Then       <a href="login.php" style="text-decoration: none" dynamicanimation="fpAnimformatRolloverFP1" fprolloverstyle="text-decoration: overline underline; color: #FF0000; font-weight: bold" onMouseOver="rollIn(this)" onMouseOut="rollOut(this)" language="Javascript1.2">       Click Here</a> to login.</p>       <p><b>Net-Petz is best viewed in Internet Explorer and looks bad on       Firefox. I'm trying to fix it but I'm new at Firefox. It's best to use       Internet Explorer. We have a really cool layout that doesn't work in FF       ;_;.</b><br>       </p>       <table border="4" cellspacing="1" width="706" id="AutoNumber4" height="1" bordercolorlight="#000099" bordercolordark="#000099">         <tr>           <td bordercolorlight="#000099" bordercolordark="#000099" align="left" valign="top" width="697" height="5" colspan="2">           <p align="center"><font size="5" face="Comic Sans MS" color="#000099">           News</font></td>         </tr>         <tr>           <td bordercolorlight="#000099" bordercolordark="#000099" align="left" valign="top" width="358" height="91">               <p align="center"><u><b>20th in the Month of the Dragonous ~ Lookup Customization </b></u></p>               <p align="center">You can now customize your lookup! :D Not excesssivly with code or anything, but you can select background, text, and table colors for your page and also add a description and image. Links to edit your lookup can be found on the lookups page. Enjoy the update ^_^.</p>               <p align="center">~Evil Programmer of DOOM (Lynsey)  </p></td>           <td bordercolorlight="#000099" bordercolordark="#000099" align="center" width="339" height="91">           <img border="0" src="welcome.jpg" width="300" height="300"></td>         </tr>         </table>       <p>       <br>       </td>     </tr>   </table> </div> </body> </html> <?php } } ?>[/code]
  11. I need to tell it if the cookie's found, re-direct, else show al the page stuff. How would I do that without echoing all the text?
  12. the problem is that the header wont redirect if there's stuff showing. If I put else { ?> then all the html then <? } will it work?
  13. I'm getting an error Parse error: parse error, unexpected $ in /homepages/20/d175171605/htdocs/index.php on line 137 But line 137 is just the ?> at the end, anyone know what's wrong? [code]<html> <head> <meta http-equiv="Content-Language" content="en-us"> <TITLE>Welcome to Net-Petz! ~ Home</TITLE> <META NAME="Description" CONTENT="Net-Petz is the newest virtual pet site on the internet. It has fun games, lots of cool petz to adopt, and tons of awesome items! It's completely free!"> <META NAME="Keywords" CONTENT="petz net virtual pets pet fun games, game, "> <script language="JavaScript" fptype="dynamicanimation"> <!-- function dynAnimation() {} function clickSwapImg() {} //--> </script> <script language="JavaScript1.2" fptype="dynamicanimation" src="animate.js"> </script> <style type="text/css"> <!-- .style3 {font-family: Arial, Helvetica, sans-serif} --> </style> <?php function checkLogin(){    /* Check if user has been remembered */    if(isset($_COOKIE['preuserID']) && isset($_COOKIE['preuserName'])){       $_SESSION['preuserID'] = $_COOKIE['preuserID'];       $_SESSION['preuserName'] = $_COOKIE['preuserName'];     header("Location:/reg/home.php");    }    else    {    echo" </head> <body onLoad=dynAnimation()> <div align=center>   <table border=1 cellspacing=1 bordercolor=#FFFFFF width=1% id=AutoNumber1 height=838 align=left>     <tr>       <td width=100% height=90 colspan=2 align=center valign=top bordercolor=#FFFFFF bordercolorlight=#FFFFFF bordercolordark=#FFFFFF>       <p>       <img border=0 src=all_n.jpg width=1024 height=91></td>     </tr>     <tr>       <td width=12% height=747 align=center valign=top bordercolor=#FFFFFF>       <p>       <img border=0 src=titleexplore.jpg width=130 height=22><br>       <a onMouseOver=document['fpAnimswapImgFP21'].imgRolln=document['fpAnimswapImgFP21'].src;document['fpAnimswapImgFP21'].src=document['fpAnimswapImgFP21'].lowsrc; onMouseOut=document['fpAnimswapImgFP21'].src=document['fpAnimswapImgFP21'].imgRolln href=oops.php>       <img border=0 src=world1.jpg id=fpAnimswapImgFP21 name=fpAnimswapImgFP21 dynamicanimation=fpAnimswapImgFP21 lowsrc=world2.jpg width=130 height=22></a><br>       <a onMouseOver=document['fpAnimswapImgFP22'].imgRolln=document['fpAnimswapImgFP22'].src;document['fpAnimswapImgFP22'].src=document['fpAnimswapImgFP22'].lowsrc; onMouseOut=document['fpAnimswapImgFP22'].src=document['fpAnimswapImgFP22'].imgRolln href=oops.php>       <img border=0 src=market1.jpg id=fpAnimswapImgFP22 name=fpAnimswapImgFP22 dynamicanimation=fpAnimswapImgFP22 lowsrc=market2.jpg width=130 height=22></a><br>       <img border=0 src=titlefun.jpg width=130 height=22><br>       <a onMouseOver=document['fpAnimswapImgFP23'].imgRolln=document['fpAnimswapImgFP23'].src;document['fpAnimswapImgFP23'].src=document['fpAnimswapImgFP23'].lowsrc; onMouseOut=document['fpAnimswapImgFP23'].src=document['fpAnimswapImgFP23'].imgRolln href=oops.php>       <img border=0 src=games1.jpg id=fpAnimswapImgFP23 name=fpAnimswapImgFP23 dynamicanimation=fpAnimswapImgFP23 lowsrc=games2.jpg width=130 height=22></a><br>       <a onMouseOver=document['fpAnimswapImgFP24'].imgRolln=document['fpAnimswapImgFP24'].src;document['fpAnimswapImgFP24'].src=document['fpAnimswapImgFP24'].lowsrc; onMouseOut=document['fpAnimswapImgFP24'].src=document['fpAnimswapImgFP24'].imgRolln href=oops.php>       <img border=0 src=boards1.jpg id=fpAnimswapImgFP24 name=fpAnimswapImgFP24 dynamicanimation=fpAnimswapImgFP24 lowsrc=boards2.jpg width=130 height=22></a><br>       <a onMouseOver=document['fpAnimswapImgFP25'].imgRolln=document['fpAnimswapImgFP25'].src;document['fpAnimswapImgFP25'].src=document['fpAnimswapImgFP25'].lowsrc; onMouseOut=document['fpAnimswapImgFP25'].src=document['fpAnimswapImgFP25'].imgRolln href=javascript:void(0)>       <img border=0 src=images/Sidebar%20&%20Layout/mail1.jpg id=fpAnimswapImgFP25 name=fpAnimswapImgFP25 dynamicanimation=fpAnimswapImgFP25 lowsrc=images/Sidebar%20&%20Layout/mail2.jpg width=130 height=22></a><br>       <a onMouseOver=document['fpAnimswapImgFP26'].imgRolln=document['fpAnimswapImgFP26'].src;document['fpAnimswapImgFP26'].src=document['fpAnimswapImgFP26'].lowsrc; onMouseOut=document['fpAnimswapImgFP26'].src=document['fpAnimswapImgFP26'].imgRolln href=stuff.php>       <img border=0 src=stuff1.jpg id=fpAnimswapImgFP26 name=fpAnimswapImgFP26 dynamicanimation=fpAnimswapImgFP26 lowsrc=stuff2.jpg width=130 height=22></a><br>       <img border=0 src=titlemisc.jpg width=130 height=22><br>       <a onMouseOver=document['fpAnimswapImgFP27'].imgRolln=document['fpAnimswapImgFP27'].src;document['fpAnimswapImgFP27'].src=document['fpAnimswapImgFP27'].lowsrc; onMouseOut=document['fpAnimswapImgFP27'].src=document['fpAnimswapImgFP27'].imgRolln href=login.php>       <img border=0 src=in1.jpg id=fpAnimswapImgFP27 name=fpAnimswapImgFP27 dynamicanimation=fpAnimswapImgFP27 lowsrc=in2.jpg width=130 height=22></a><br>       <a onMouseOver=document['fpAnimswapImgFP28'].imgRolln=document['fpAnimswapImgFP28'].src;document['fpAnimswapImgFP28'].src=document['fpAnimswapImgFP28'].lowsrc; onMouseOut=document['fpAnimswapImgFP28'].src=document['fpAnimswapImgFP28'].imgRolln href=logout.php>       <img border=0 src=out1.jpg id=fpAnimswapImgFP28 name=fpAnimswapImgFP28 dynamicanimation=fpAnimswapImgFP28 lowsrc=out2.jpg width=130 height=22></a><br>       <a onMouseOver=document['fpAnimswapImgFP29'].imgRolln=document['fpAnimswapImgFP29'].src;document['fpAnimswapImgFP29'].src=document['fpAnimswapImgFP29'].lowsrc; onMouseOut=document['fpAnimswapImgFP29'].src=document['fpAnimswapImgFP29'].imgRolln href=help.php>       <img border=0 src=help1.jpg id=fpAnimswapImgFP29 name=fpAnimswapImgFP29 dynamicanimation=fpAnimswapImgFP29 lowsrc=help2.jpg width=130 height=22></a><br>       <a onMouseOver=document['fpAnimswapImgFP30'].imgRolln=document['fpAnimswapImgFP30'].src;document['fpAnimswapImgFP30'].src=document['fpAnimswapImgFP30'].lowsrc; onMouseOut=document['fpAnimswapImgFP30'].src=document['fpAnimswapImgFP30'].imgRolln href=contact.php>       <img border=0 src=contact1.jpg id=fpAnimswapImgFP30 name=fpAnimswapImgFP30 dynamicanimation=fpAnimswapImgFP30 lowsrc=contact2.jpg width=130 height=22></a></p>       <div align=center style=width: 130; height: 176>         <center>         <table border=3 cellspacing=1 bordercolor=#000099 width=100% id=AutoNumber2 height=253>           <tr>             <td width=100% height=126 align=center bordercolor=#000099>             <font color=#000099>            <? print Hi $preuserName!; ?></font></b><br>             <b>             <font color=#000099><? print $points Net-Pointz.; ?></font></td>           </tr>           <tr>             <td width=100% height=127 align=center bordercolor=#000099>             <a style=text-decoration: none dynamicanimation=fpAnimformatRolloverFP1 fprolloverstyle=color: #FF0000; text-decoration: overline underline; font-weight: bold onMouseOver=rollIn(this) onMouseOut=rollOut(this) language=Javascript1.2 href=oops.php>My Petz</a><br>             <a style=text-decoration: none dynamicanimation=fpAnimformatRolloverFP1 fprolloverstyle=color: #FF0000; text-decoration: overline underline; font-weight: bold onMouseOver=rollIn(this) onMouseOut=rollOut(this) language=Javascript1.2 href=oops.php>My Inventory</a></td>           </tr>         </table>         </center>       </div>       <p><br>       <br> &nbsp;</td>       <td width=88% height=747 align=center valign=top>       &nbsp;<table border=4 cellspacing=1 width=67% id=AutoNumber3 bordercolorlight=#000099 bordercolordark=#000099>         <tr>           <td width=100% bordercolorlight=#000099 bordercolordark=#000099>           <img border=0 src=Welcome%20logo.gif width=618 height=44></td>         </tr>       </table>       <p>Net-Petz is the newest virtual pet site on the internet. It's filled       with cool petz, fun games, exciting places, and much more. It's free to       sign up so what are you waiting for?       <a style=text-decoration: none dynamicanimation=fpAnimformatRolloverFP1 fprolloverstyle=color: #FF0000; text-decoration: overline underline; font-weight: bold onMouseOver=rollIn(this) onMouseOut=rollOut(this) language=Javascript1.2 href=register.php>       Click Here</a> to Sign Up. Already a member? Then       <a href=login.php style=text-decoration: none dynamicanimation=fpAnimformatRolloverFP1 fprolloverstyle=text-decoration: overline underline; color: #FF0000; font-weight: bold onMouseOver=rollIn(this) onMouseOut=rollOut(this) language=Javascript1.2>       Click Here</a> to login.</p>       <p><b>Net-Petz is best viewed in Internet Explorer and looks bad on       Firefox. I'm trying to fix it but I'm new at Firefox. It's best to use       Internet Explorer. We have a really cool layout that doesn't work in FF       ;_;.</b><br>       </p>       <table border=4 cellspacing=1 width=706 id=AutoNumber4 height=1 bordercolorlight=#000099 bordercolordark=#000099>         <tr>           <td bordercolorlight=#000099 bordercolordark=#000099 align=left valign=top width=697 height=5 colspan=2>           <p align=center><font size=5 face=Comic Sans MS color=#000099>           News</font></td>         </tr>         <tr>           <td bordercolorlight=#000099 bordercolordark=#000099 align=left valign=top width=358 height=91>               <p align=center><u><b>20th in the Month of the Dragonous ~ Lookup Customization </b></u></p>               <p align=center>You can now customize your lookup! :D Not excesssivly with code or anything, but you can select background, text, and table colors for your page and also add a description and image. Links to edit your lookup can be found on the lookups page. Enjoy the update ^_^.</p>               <p align=center>~Evil Programmer of DOOM (Lynsey)  </p></td>           <td bordercolorlight=#000099 bordercolordark=#000099 align=center width=339 height=91>           <img border=0 src=welcome.jpg width=300 height=300></td>         </tr>         </table>       <p>       <br>       </td>     </tr>   </table> </div> </body> </html>"; ?>[/code]
  14. How do I do that? (sorry, I'm kinda new at this)
  15. Then how do I put all 4 drop-down lists?
  16. I'm making a script to let users customize the page. There's 4 select boxes but only 1 is showing up fully, anopther is showing up empty and the submit button isn't showing up. Does anyone know what's wrong? [code]<? session_start(); $session=session_id( ); include ("secure/config2.php"); $sql = "SELECT * from chibifriends where preuserID ='$preuserID'"; $result = mysql_query($sql, $connection); $numShop = mysql_num_rows($result); $query_data =mysql_fetch_array($result); $bgColor = $query_data['bgColor']; $fontColor = $query_data['fontColor']; $boxColor = $query_data['boxColor']; $boxbColor = $query_data['boxbColor']; ?> <form method=post action=secure/luedit2.php>   <p align="center">Modify Your Userlookup </p>   <table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="212" id="AutoNumber1" height="75" align=center>     <tr>       <td width="131" height="19" bgcolor="#000080" bordercolor="#FFFFFF" align="right"><font color="#FFFFFF">Background Color </font></td>       <td width="75" height="19" bgcolor="#000080" bordercolor="#FFFFFF"><p align="left"> <select name='bgColor'> <?php function select($bgColor, $type){if ($bgColor == $type) echo "selected=\"selected\"";}?> <option value='White'<?php select($bgColor, "White");?>>White</option> <option value='Black'<?php select($bgColor, "Black");?>>Black</option> <option value='Blue'<?php select($bgColor, "Blue");?>>Blue</option> <option value='Red'<?php select($bgColor, "Red");?>>Red</option> <option value='Green'<?php select($bgColor, "Green");?>>Green</option> <option value='Yellow'<?php select($bgColor, "Yellow");?>>Yellow</option> </select>       </td>     </tr>     <tr>       <td width="131" height="15" bgcolor="#0066FF" bordercolor="#FFFFFF" align="right"><font color="#FFFFFF">Text Color</font></td>       <td width="75" height="15" bgcolor="#0066FF" bordercolor="#FFFFFF"> <select name='fontColor'> <?php  function select($fontColor, $type2){if ($fontColor == $type2) echo "selected=\"selected\"";}?> <option value='White'<?php select($fontColor, "White");?>>White</option> <option value='Black'<?php select($fontColor, "Black");?>>Black</option> <option value='Blue'<?php select($fontColor, "Blue");?>>Blue</option> <option value='Red'<?php select($fontColor, "Red");?>>Red</option> <option value='Green'<?php select($fontColor, "Green");?>>Green</option> <option value='Yellow'<?php select($fontColor, "Yellow");?>>Yellow</option> </select></td>     </tr>     <tr>       <td width="131" height="19" bgcolor="#000080" bordercolor="#FFFFFF" align="right"><font color="#FFFFFF">Table Color</font></td>       <td width="75" height="19" bgcolor="#000080" bordercolor="#FFFFFF"> <select name='boxColor'> <?php function select($boxColor, $type3){if ($boxColor == $type3) echo "selected=\"selected\"";}?> <option value='White'<?php select($boxColor, "White");?>>White</option> <option value='Black'<?php select($boxColor, "Black");?>>Black</option> <option value='Blue'<?php select($boxColor, "Blue");?>>Blue</option> <option value='Red'<?php select($boxColor, "Red");?>>Red</option> <option value='Green'<?php select($boxColor, "Green");?>>Green</option> <option value='Yellow'<?php select($boxColor, "Yellow");?>>Yellow</option> </select></td>     </tr>     <tr>       <td width="131" height="19" bgcolor="#0066FF" bordercolor="#FFFFFF" align="right"><font color="#FFFFFF">Table Border Color</font></td>       <td width="75" height="19" bgcolor="#0066FF" bordercolor="#FFFFFF"> <select name='boxbColor'> <?php function select($boxbColor, $type4){if ($boxbColor == $type4) echo "selected=\"selected\"";}?> <option value='White'<?php select($boxbColor, "White");?>>White</option> <option value='Black'<?php select($boxbColor, "Black");?>>Black</option> <option value='Blue'<?php select($boxbColor, "Blue");?>>Blue</option> <option value='Red'<?php select($boxbColor, "Red");?>>Red</option> <option value='Green'<?php select($boxbColor, "Green");?>>Green</option> <option value='Yellow'<?php select($boxbColor, "Yellow");?>>Yellow</option> </select></td>     </tr>   </table>       <p align=center><input type=submit value=Submit name=submit> </form> </p>[/code]
  17. I took the bool out, nothing's happening. I logged in, closed the page, and opened it and it didn't re-direct.
  18. I have   session_start();   session_register('preuserName');   session_register('preuserID');   $session=session_id(); when you login, but I don't know how to make it not expire when you close the window. I'd like them to last for a year or just forever.
  19. Parse error: parse error, unexpected T_STRING in /homepages/20/d175171605/htdocs/reg/secure/index.php on line 47 Line 47 is bool setcookie ("preuserID", $preuserID, $expire, '/', 'net-petz.com');
×
×
  • 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.