Jump to content

Pi_Mastuh

Members
  • Posts

    233
  • Joined

  • Last visited

    Never

About Pi_Mastuh

  • Birthday 02/01/1993

Profile Information

  • Gender
    Female
  • Location
    MN

Pi_Mastuh's Achievements

Member

Member (2/5)

0

Reputation

  1. I'm not sure how to get it to check all of those conditions though. I tried using parentheses inside of parenthesis and it didn't work.
  2. I am trying to run a rather complex query, and am getting the error: "Every derived table must have its own alias." I haven't done this kind of complex SQL before, could somebody tell me what I'm missing here? Thanks! $SQL2 = "SELECT * FROM shiftsIn WHERE date='$day' AND month='$month' AND year='$year' AND busID='$userBusID'"; $SQL = "SELECT * FROM ($SQL2) WHERE (startTime<='$startTime2' AND endTime>='$endTime2') OR (startTime IS NULL AND endTime IS NULL)"; $resultShifts = mysql_query($SQL,$connection) or die(mysql_error()); $numShifts = mysql_num_rows($resultShifts);
  3. Makes sense, thanks!
  4. I am trying to run a select query, and am not sure why I'm getting a syntax error. $SQL2 = "SELECT * FROM messages WHERE to='$username' OR (to='ALL' AND busID='$busID')"; $result = mysql_query($SQL2,$connection) or die(mysql_error()); "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'to='lynsey93' OR (to='ALL' AND busID='1')' at line 1" Could anybody shed some light on the situation?
  5. Here's my code, is there something wrong in it?: <? session_start(); $session=session_id( ); include ("secure/config.php"); //WHEN YOU PUT THIS ON THE PAGES ADD A secure/ BEFORE CONFIG.PHP! ?> <script language="JavaScript" type="text/JavaScript"> <!-- function MM_reloadPage(init) { //reloads the window if Nav4 resized if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) { document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }} else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload(); } MM_reloadPage(true); //--> </script> <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, "> </head> <body> <? if ($preuserID == 0) { include ("../oops.htm"); die; } ?> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="1155" id="AutoNumber1" height="802"> <tr><td width="1483" height="138" valign="top" align="right" <? $rand = rand (1,10); if ($rand == 1) { echo "background=SB1_anubis.png"; } elseif ($rand == 2) { echo "background=SB1_bromaro.png"; } elseif ($rand == 3) { echo "background=SB1_fang.png"; } elseif ($rand == 4) { echo "background=SB1_kitachia.png"; } elseif ($rand == 5) { echo "background=SB1_coarattla.png"; } elseif ($rand == 6) { echo "background=SB1_dragonous.png"; } elseif ($rand == 7) { echo "background=SB1_fizz.png"; } elseif ($rand == { echo "background=SB1_woofosa.png"; } elseif ($rand == 9) { echo "background=SB1_worfoli.png"; } elseif ($rand == 10) { echo "background=SB1_lionaya.png"; } ?> colspan="2"> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber3" height="113"> <tr> <td width="15%" height="104" colspan="3" rowspan="3"> </td> <td width="31%" height="40"> </td> <td width="54%" height="104" rowspan="3"> </td> </tr> <tr> <td width="31%" height="23"> <p align="center"><b> <font color="#FFFFFF" face="Arial" style="font-size: 11pt"><? if ($preuserID != 0){ print "<a href=http://www.net-petz.com/reg/lookup.php?Name=$preuserName><font color=#FFFFFF>$preuserName</a>"; } else { print "Guest"; } ?> - <? if ($preuserID != 0){ print "<a href=http://www.net-petz.com/reg/bank.php><font color=#FFFFFF>$points NPz</a>"; } else { print "0 NPz"; } ?> - <? if ($preuserID != 0 AND $activePetID == 0) { print "No Active Pet"; } elseif ($preuserID != 0){ print "<a href=http://www.net-petz.com/reg/petDetails2.php?monopetID=$activePetID><font color=#FFFFFF>$activePetName</a> is Active"; } else { print "No Active Pet"; } ?></font></b></td> </tr> </table> </td> </tr><tr><td> <div style="background-image:url("SB3.png"); height:600px; height:100px; padding: 10px; text-align:center"><b> .: Main :.<br> </b> <? if ($preuserID != 0){ echo "<font color=#FFFFFF face=Arial><a href=http://www.net-petz.com/reg/home.php><font color=#FFFFFF>Home</a>"; } else { echo "<font color=#FFFFFF face=Arial><a href=http://www.net-petz.com><font color=#FFFFFF>Home</a>"; } ?><br></font> <a href="http://www.net-petz.com/reg/mypets.php"><font color="#FFFFFF">My Petz</font></a><br> <a href="http://www.net-petz.com/reg/myitems.php"><font color="#FFFFFF">Inventory</font></a><br> <? if ($preuserID != 0){ echo "<a href=http://www.net-petz.com/reg/logout.php><font color=#FFFFFF><- Logout</font></a><br>"; } else { echo "<a href=http://www.net-petz.com/login.php><font color=#FFFFFF>Login -></font></a><br>"; } ?><br> <b>.:Explore:.</b><br> <a href="http://www.net-petz.com/reg/netlandia.php"> <font color="#FFFFFF">Netlandia</font></a><br> <a href="http://www.net-petz.com/reg/city.php"><font color="#FFFFFF">Net-City</font></a><br><br> <b>.:Interact:.</b><br> <a href="http://www.net-petz.com/reg/messageboard.php"> <font color="#FFFFFF">Net-Boards</font></a><br> <a href="http://www.net-petz.com/reg/inbox.php"><font color="#FFFFFF">Net-Mail</font></a><br> <a href="http://www.net-petz.com/reg/lookups.php"><font color="#FFFFFF">Lookups</font></a><br> <a href="http://www.net-petz.com/reg/ushops.php"><font color="#FFFFFF">User Shops</font></a><br><br> <b>.:Fun:.</b><br> <a href="http://www.net-petz.com/reg/games.php"><font color="#FFFFFF">Game Room</font></a><br> <a href="http://www.net-petz.com/reg/stuff.php"><font color="#FFFFFF">Fun Stuff</font></a><br><br> <b>.:Options:.</b><br> <a href="http://www.net-petz.com/reg/userInfo.php"> <font color="#FFFFFF">User Options</font></a><br> <a href="http://www.net-petz.com/reg/luedit.php"><font color="#FFFFFF">Lookup Options</font></a><br> <a href="http://www.net-petz.com/reg/boardpreff.php"> <font color="#FFFFFF">Board Options</font></a><br><br> <b>.:More:.</b><br> <? if ($preuserID != 0){ echo "<font color=#FFFFFF face=Arial><a href=http://www.net-petz.com/reg/help.php><font color=#FFFFFF>About Us</a>"; } else { echo "<font color=#FFFFFF face=Arial><a href=http://www.net-petz.com/help.php><font color=#FFFFFF>About Us</a>"; } ?><br> <? if ($preuserID != 0){ echo "<font color=#FFFFFF face=Arial><a href=http://www.net-petz.com/reg/contact.php><font color=#FFFFFF>Contact Us</a>"; } else { echo "<font color=#FFFFFF face=Arial><a href=http://www.net-petz.com/contact.php><font color=#FFFFFF>Contact Us</a>"; } ?></td> </div> </tr> </table> </td> <td width="1213" height="1002" valign="top" align="center" rowspan="2"> <? include ("secure/randoms.php"); ?> <? //PAGE CONTENT ?> <? //END PAGE CONTENT ?> </td> </tr> <tr> <td width="270" height="415" valign="top" align="right"> </td> </tr> </table> </body> </html>
  6. I got this: http://i98.photobucket.com/albums/l247/Thomalor/sc3.jpg
  7. How do I do that? Here's the code I'm using: <? session_start(); $session=session_id( ); include ("secure/config.php"); //WHEN YOU PUT THIS ON THE PAGES ADD A secure/ BEFORE CONFIG.PHP! ?> <script language="JavaScript" type="text/JavaScript"> <!-- function MM_reloadPage(init) { //reloads the window if Nav4 resized if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) { document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }} else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload(); } MM_reloadPage(true); //--> </script> <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, "> </head> <body> <? if ($preuserID == 0) { include ("../oops.htm"); die; } ?> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="1155" id="AutoNumber1" height="802"> <tr><td width="1483" height="138" valign="top" align="right" <? $rand = rand (1,10); if ($rand == 1) { echo "background=SB1_anubis.png"; } elseif ($rand == 2) { echo "background=SB1_bromaro.png"; } elseif ($rand == 3) { echo "background=SB1_fang.png"; } elseif ($rand == 4) { echo "background=SB1_kitachia.png"; } elseif ($rand == 5) { echo "background=SB1_coarattla.png"; } elseif ($rand == 6) { echo "background=SB1_dragonous.png"; } elseif ($rand == 7) { echo "background=SB1_fizz.png"; } elseif ($rand == { echo "background=SB1_woofosa.png"; } elseif ($rand == 9) { echo "background=SB1_worfoli.png"; } elseif ($rand == 10) { echo "background=SB1_lionaya.png"; } ?> colspan="2"> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber3" height="113"> <tr> <td width="15%" height="104" colspan="3" rowspan="3"> </td> <td width="31%" height="40"> </td> <td width="54%" height="104" rowspan="3"> </td> </tr> <tr> <td width="31%" height="23"> <p align="center"><b> <font color="#FFFFFF" face="Arial" style="font-size: 11pt"><? if ($preuserID != 0){ print "<a href=http://www.net-petz.com/reg/lookup.php?Name=$preuserName><font color=#FFFFFF>$preuserName</a>"; } else { print "Guest"; } ?> - <? if ($preuserID != 0){ print "<a href=http://www.net-petz.com/reg/bank.php><font color=#FFFFFF>$points NPz</a>"; } else { print "0 NPz"; } ?> - <? if ($preuserID != 0 AND $activePetID == 0) { print "No Active Pet"; } elseif ($preuserID != 0){ print "<a href=http://www.net-petz.com/reg/petDetails2.php?monopetID=$activePetID><font color=#FFFFFF>$activePetName</a> is Active"; } else { print "No Active Pet"; } ?></font></b></td> </tr> </table> </td> </tr> <tr> <td width="325" height="657" valign="top" align="right" background="SB3.png"> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="103%" id="AutoNumber4" height="42"> <tr> <td width="7%" height="27" align="center"> </td> <td width="51%" height="27" align="center" valign="top"> </td> <td width="92%" height="27"> </td> </tr> <tr> <td width="7%" height="536" align="center"> </td> <td width="51%" height="536" align="center" valign="top"> <font color="#FFFFFF" face="Arial"> <font color="#FFFFFF" face="Arial"><b>.:Main:.<br> </b> <? if ($preuserID != 0){ echo "<font color=#FFFFFF face=Arial><a href=http://www.net-petz.com/reg/home.php><font color=#FFFFFF>Home</a>"; } else { echo "<font color=#FFFFFF face=Arial><a href=http://www.net-petz.com><font color=#FFFFFF>Home</a>"; } ?><br></font> <a href="http://www.net-petz.com/reg/mypets.php"><font color="#FFFFFF">My Petz</font></a><br> <a href="http://www.net-petz.com/reg/myitems.php"><font color="#FFFFFF">Inventory</font></a><br> <? if ($preuserID != 0){ echo "<a href=http://www.net-petz.com/reg/logout.php><font color=#FFFFFF><- Logout</font></a><br>"; } else { echo "<a href=http://www.net-petz.com/login.php><font color=#FFFFFF>Login -></font></a><br>"; } ?><br> <b>.:Explore:.</b><br> <a href="http://www.net-petz.com/reg/netlandia.php"> <font color="#FFFFFF">Netlandia</font></a><br> <a href="http://www.net-petz.com/reg/city.php"><font color="#FFFFFF">Net-City</font></a><br><br> <b>.:Interact:.</b><br> <a href="http://www.net-petz.com/reg/messageboard.php"> <font color="#FFFFFF">Net-Boards</font></a><br> <a href="http://www.net-petz.com/reg/inbox.php"><font color="#FFFFFF">Net-Mail</font></a><br> <a href="http://www.net-petz.com/reg/lookups.php"><font color="#FFFFFF">Lookups</font></a><br> <a href="http://www.net-petz.com/reg/ushops.php"><font color="#FFFFFF">User Shops</font></a><br><br> <b>.:Fun:.</b><br> <a href="http://www.net-petz.com/reg/games.php"><font color="#FFFFFF">Game Room</font></a><br> <a href="http://www.net-petz.com/reg/stuff.php"><font color="#FFFFFF">Fun Stuff</font></a><br><br> <b>.:Options:.</b><br> <a href="http://www.net-petz.com/reg/userInfo.php"> <font color="#FFFFFF">User Options</font></a><br> <a href="http://www.net-petz.com/reg/luedit.php"><font color="#FFFFFF">Lookup Options</font></a><br> <a href="http://www.net-petz.com/reg/boardpreff.php"> <font color="#FFFFFF">Board Options</font></a><br><br> <b>.:More:.</b><br> <? if ($preuserID != 0){ echo "<font color=#FFFFFF face=Arial><a href=http://www.net-petz.com/reg/help.php><font color=#FFFFFF>About Us</a>"; } else { echo "<font color=#FFFFFF face=Arial><a href=http://www.net-petz.com/help.php><font color=#FFFFFF>About Us</a>"; } ?><br> <? if ($preuserID != 0){ echo "<font color=#FFFFFF face=Arial><a href=http://www.net-petz.com/reg/contact.php><font color=#FFFFFF>Contact Us</a>"; } else { echo "<font color=#FFFFFF face=Arial><a href=http://www.net-petz.com/contact.php><font color=#FFFFFF>Contact Us</a>"; } ?></td> <td width="92%" height="536"> </td> </tr> </table> </td> <td width="1213" height="1002" valign="top" align="center" rowspan="2"> <? include ("secure/randoms.php"); ?> <? //PAGE CONTENT ?> <? //END PAGE CONTENT ?> </td> </tr> <tr> <td width="270" height="415" valign="top" align="right"> </td> </tr> </table> </body> </html>
  8. I have a sidebar made using tables and the image as the background, but when there's content in the main table to pushes on the sidebar tables thus misaligning the text. I have some images: http://i98.photobucket.com/albums/l247/Thomalor/sc1.jpg http://i98.photobucket.com/albums/l247/Thomalor/sc2.jpg
  9. Oh! That shouldn't be on this one, it's the script that tells it to say "you're not logged in" if you're not, but you shouldn't be logged in on the login page
  10. When I go to this page it's just a blank screen. Would anyone be able to tell me what's wrong? <? session_start(); $session=session_id( ); include ("secure/config.php"); //WHEN YOU PUT THIS ON THE PAGES ADD A secure/ BEFORE CONFIG.PHP! ?> <script language="JavaScript" type="text/JavaScript"> <!-- function MM_reloadPage(init) { //reloads the window if Nav4 resized if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) { document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }} else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload(); } MM_reloadPage(true); //--> </script> <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, "> </head> <body> <? if ($preuserID == 0) { include ("../oops.htm"); die; } ?> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="1155" id="AutoNumber1" height="802"> <tr> <td width="1483" height="138" valign="top" align="right" <?php $imgs = ('anubis','bromaro','fang','kitachia','coarattla','dragonous','fizz','woofosa','worfoli','lionaya'); $rand = rand (0,9); echo ' background="SB1_' . $imgs[$i] . '"'; ?> colspan="2"> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber3" height="113"> <tr> <td width="15%" height="104" colspan="3" rowspan="3"> </td> <td width="31%" height="40"> </td> <td width="54%" height="104" rowspan="3"> </td> </tr> <tr> <td width="31%" height="23"> <p align="center"><b> <font color="#FFFFFF" face="Arial" style="font-size: 11pt"><? if ($preuserID != 0){ print "<a href=http://www.net-petz.com/reg/lookup.php?Name=$preuserName><font color=#FFFFFF>$preuserName</a>"; } else { print "Guest"; } ?> - <? if ($preuserID != 0){ print "<a href=http://www.net-petz.com/reg/bank.php><font color=#FFFFFF>$points NPz</a>"; } else { print "0 NPz"; } ?> - <? if ($preuserID != 0 AND $activePetID == 0) { print "No Active Pet"; } elseif ($preuserID != 0){ print "<a href=http://www.net-petz.com/reg/petDetails2.php?monopetID=$activePetID><font color=#FFFFFF>$activePetName</a> is Active"; } else { print "No Active Pet"; } ?></font></b></td> </tr> </table> </td> </tr> <tr> <td width="325" height="657" valign="top" align="right" background="SB3.png"> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="103%" id="AutoNumber4" height="42"> <tr> <td width="7%" height="27" align="center"> </td> <td width="51%" height="27" align="center" valign="top"> </td> <td width="92%" height="27"> </td> </tr> <tr> <td width="7%" height="536" align="center"> </td> <td width="51%" height="536" align="center" valign="top"> <font color="#FFFFFF" face="Arial"> <font color="#FFFFFF" face="Arial"><b>.:Main:.<br> </b> <? if ($preuserID != 0){ echo "<font color=#FFFFFF face=Arial><a href=http://www.net-petz.com/reg/home.php><font color=#FFFFFF>Home</a>"; } else { echo "<font color=#FFFFFF face=Arial><a href=http://www.net-petz.com><font color=#FFFFFF>Home</a>"; } ?><br></font> <a href="http://www.net-petz.com/reg/mypets.php"><font color="#FFFFFF">My Petz</font></a><br> <a href="http://www.net-petz.com/reg/myitems.php"><font color="#FFFFFF">Inventory</font></a><br> <? if ($preuserID != 0){ echo "<a href=http://www.net-petz.com/reg/logout.php><font color=#FFFFFF><- Logout</font></a><br>"; } else { echo "<a href=http://www.net-petz.com/login.php><font color=#FFFFFF>Login -></font></a><br>"; } ?><br> <b>.:Explore:.</b><br> <a href="http://www.net-petz.com/reg/netlandia.php"> <font color="#FFFFFF">Netlandia</font></a><br> <a href="http://www.net-petz.com/reg/city.php"><font color="#FFFFFF">Net-City</font></a><br><br> <b>.:Interact:.</b><br> <a href="http://www.net-petz.com/reg/messageboard.php"> <font color="#FFFFFF">Net-Boards</font></a><br> <a href="http://www.net-petz.com/reg/inbox.php"><font color="#FFFFFF">Net-Mail</font></a><br> <a href="http://www.net-petz.com/reg/lookups.php"><font color="#FFFFFF">Lookups</font></a><br> <a href="http://www.net-petz.com/reg/ushops.php"><font color="#FFFFFF">User Shops</font></a><br><br> <b>.:Fun:.</b><br> <a href="http://www.net-petz.com/reg/games.php"><font color="#FFFFFF">Game Room</font></a><br> <a href="http://www.net-petz.com/reg/stuff.php"><font color="#FFFFFF">Fun Stuff</font></a><br><br> <b>.:Options:.</b><br> <a href="http://www.net-petz.com/reg/userInfo.php"> <font color="#FFFFFF">User Options</font></a><br> <a href="http://www.net-petz.com/reg/luedit.php"><font color="#FFFFFF">Lookup Options</font></a><br> <a href="http://www.net-petz.com/reg/boardpreff.php"> <font color="#FFFFFF">Board Options</font></a><br><br> <b>.:More:.</b><br> <? if ($preuserID != 0){ echo "<font color=#FFFFFF face=Arial><a href=http://www.net-petz.com/reg/help.php><font color=#FFFFFF>About Us</a>"; } else { echo "<font color=#FFFFFF face=Arial><a href=http://www.net-petz.com/help.php><font color=#FFFFFF>About Us</a>"; } ?><br> <? if ($preuserID != 0){ echo "<font color=#FFFFFF face=Arial><a href=http://www.net-petz.com/reg/contact.php><font color=#FFFFFF>Contact Us</a>"; } else { echo "<font color=#FFFFFF face=Arial><a href=http://www.net-petz.com/contact.php><font color=#FFFFFF>Contact Us</a>"; } ?></td> <td width="92%" height="536"> </td> </tr> </table> </td> <td width="1213" height="1002" valign="top" align="center" rowspan="2"> <? include ("secure/randoms.php"); ?> <? //PAGE CONTENT ?> <font color="#CEE7FF" size="2" face="Arial, Helvetica, sans-serif"><strong> Login</strong></font></div></td> </tr> <tr> <td bgcolor="#CEE7FF"> <div align="center"> <form method="POST" action="reg/secure/index.php"> <table width="300" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="219"> <p align="left"><font face="Arial, Helvetica, sans-serif" size="2"> <b> User Name: </b></font></td> <td width="181"><font face="Arial, Helvetica, sans-serif" size="2"> <input type="text" name="preuserName" size="20"> </font></td> </tr> <tr> <td width="219"><font face="Arial, Helvetica, sans-serif" size="2"> <b>Password:</b></font></td> <td width="181"><font face="Arial, Helvetica, sans-serif" size="2"> <input type="password" name="preuserPassword" size="20"> </font></td> </tr> <tr> <td colspan="2" height="2"> <div align="center"><font face="Arial, Helvetica, sans-serif" size="2"> </font></div></td> </tr> <tr> <td colspan="2" height="2"> <div align="center"><font face="Arial, Helvetica, sans-serif" size="2"> <input type=submit name="Submit" value="Submit"> </font></div></td> </tr> </table> </form> <? //END PAGE CONTENT ?> </td> </tr> <tr> <td width="270" height="415" valign="top" align="right"> </td> </tr> </table> </body> </html>
  11. Oh, thanks.
  12. No, it's echoing the thing for the background image.
  13. I have a table and another table inside the cell.
  14. No, I have it randomizing from 10 different images for the background.
  15. I want a table in a table.
×
×
  • 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.