Jump to content

Pi_Mastuh

Members
  • Posts

    233
  • Joined

  • Last visited

    Never

Everything posted by Pi_Mastuh

  1. That doesn't work. It doesn't like the $.
  2. Where do I put that (the actionscript part) and what woul the value be because I'm trying to send the score and it varries game to game.
  3. I can't get it to send the variable and recieve it in the php file. How do I send a variable?
  4. Actualy i think that it's sending the variable right, it's just not working for some reason. This is the code for the final page that does the stuff and displays a confirmation messages: [code]<?php session_start(); $session = session_id(); include ("../htm/siteinfo.htm"); include ("dbinfo.php"); $SQL = "SELECT * FROM chibifriendspets WHERE monopetID = '$monopetID'";   $result = mysql_query($SQL,$connection); $query_data = mysql_fetch_array($result); $hunger = $query_data['hunger']; $monopetName = $query_data['monopetName']; $SQL = "SELECT * FROM myitemschibi WHERE itemID = '$itemID'";   $result = mysql_query($SQL,$connection); $query_data = mysql_fetch_array($result); $food = $query_data['food']; $itemName = $query_data['itemName']; $fedtime = strtotime("today"); $itemID = $_POST['itemID']; $monopetID = $_POST['monopetID']; if ($food == "Food"); { $hunger--; } if ($food == "Food"); { $SQL = "DELETE from myitemschibi WHERE itemID = $itemID"; } if ($food == "Food"); { $SQL = "UPDATE chibifriendspets SET lastDatefed = $fedtime, WHERE petID = $petID"; } ?> You have used <? print"$itemName" ?> on <? print"$monopetName" ?>![/code]
  5. I'm making a script where when you click on and item it goes to the next screen and you click on a link which takes you to a new screen then you click on the pet that you want to use the item on, which produces a popup window that runs a few scripts (decrease the hunger, update last time fed, and delete the item) and displays a confirmation message. Somehow the data's not being sent from page to page somewhere. The message should read 'you have used ____ on ____!' but it says 'You have used on ___!'. Can someone help me? Just let me know which codes you need to see.
  6. I'm making a flash game where the user sends their score and it inserts it into the database but for some reason it's not connecting properly. The actionscript for the send score button instance is: [code]on(press) { getURL("maze1.php", "score"); }[/code] Maze 1 is: [code]<?   if ($msg == 1) {   print"<BR><BR><P align=center><font face='Arial, Helvetica, sans-serif' size=2>You have earned $mds Points.</font></P>   <P align=center><font face='Arial, Helvetica, sans-serif' size=2><a href=games.php>Play Again</a></font></P>";       }     if ($error == 2) {   print"<BR><BR><P align=center><font face='Arial, Helvetica, sans-serif' size=2>Sorry, your score does not count as you have already submitted it more then the 7 times. You can play as many times as you want but you can only submit your score 7 times.</font></P>   <P align=center><font face='Arial, Helvetica, sans-serif' size=2><a href=games.php>Play Again</a></font></P>";       }     ?> [/code]
  7. I dont have 1 yet. I dunno how to make it  :-\
  8. I'm making a virtual pet site. I need to make a listbox that drops down with all the pet names of that user, and when you click on them is decreases their hunger by one and deletes the item. How would I do that?
  9. Yes! Cept the only thing is that the name shows up as Spicy%20Pepper%20Pizza instead of Spicy Pepper Pizza. What's the corrdect code for spaces?
  10. It shows this above the blank table: Array (     [itemID] => 40     [userID] => 29     [petID] => 0     [itemName] => Spicy Pepper Pizza     [itemQty] => 1     [petPointsValue] => 0     [itemStoreID] => 1579     [food] => 0 )
  11. Config 3 is [code]<? include ("htm/siteinfo.htm"); //connection information include ("dbinfo.php"); //end connection information $SQL = "SELECT * FROM chibifriends WHERE preuserID = '$preuserID'";   $result = mysql_query($SQL,$connection); $query_data = mysql_fetch_array($result); $preuserID = $query_data['preuserID']; $points = $query_data['preuserDigitalCredits']; ?>[/code] The connection info is in dbinfo. Which is: [code]<? //connection information $db_name = "db175253437"; $table_name = "chibifriends"; $connection =mysql_connect("db491.perfora.net", "dbo175253437" ,"**********") or die("Couldn't connect"); $db = mysql_select_db($db_name, $connection) or die("Couldn't select Database1."); $connection2 = $connection; ?>[/code]
  12. Unable to run query Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
  13. http://www.net-petz.com/reg/secure/info.php I have 1and1 hosting, if that means anything to you.
  14. Fatal error: Call to undefined function: mysq_fetch_assoc() in /homepages/20/d175171605/htdocs/reg/secure/itemdetails.php on line 12
  15. Yes, itemID 40 exists. Belongs to userID 29, itemName is spicy pepper pizza. here's the whole itemdetails.php code: [code]<? session_start(); $session=session_id( ); $itemID = $_POST['itemID']; include ("secure/config3.php"); $SQL = "SELECT * FROM myitemschibi WHERE itemID ='$itemID'"; $image = str_replace(" ", "", $itemName); $spacedname = str_replace(" ", "%20", $itemName); ?> <html> <head> <title><? print $itemName; ?></title> </head> <body> <BR> <table width="227" border="0" cellspacing="0" cellpadding="0" height="104" style="border-collapse: collapse" bordercolor="#111111">   <tr>     <td height="104" valign="top" width="227" bordercolorlight="#000080">       <table width="200" border="1" cellspacing="0" cellpadding="0" bgcolor="#6699FF" bordercolor="#000066">         <tr>           <td align=center>             <table width="200" border="0" cellspacing="0" cellpadding="0">               <tr align=center bgcolor="blue">                 <td align=center bgcolor="blue">                   <div align="center"><font face=Arial, Helvetica, sans-serif size=3 color="blue"><b>                     <? print "$spacedname"; ?>                     </b></font></div>                 </td>               </tr>               <tr bgcolor="#FFFFFF" align="center"> <img src="../images/items/<?php echo $image;?>.jpg"> <br>               </tr>             </table>           </td>         </tr>       </table><BR>       <table width="205" border="1" cellspacing="0" cellpadding="0" bordercolor="#000099">         <tr>           <td><table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%">             <tr bgcolor="#FFCCFF">               <td height="20" colspan="2" bgcolor="#0000FF" bordercolor="navy"><div align="center">               <font face="Arial, Helvetica, sans-serif" size="2" color="#FFFFFF"><b>Item Info:</b></font></div></td>             </tr>             <tr>               <td width="99" height="10" bordercolor="navy"><font face="Arial, Helvetica, sans-serif" size="1">&nbsp;Type:</font></td>               <td width="101" height="10" bordercolor="navy"><font face="Arial, Helvetica, sans-serif" size="1"><? print "$type"; ?> </font></td>             </tr>             <tr>               <td height="19" bordercolor="navy"><font face="Arial, Helvetica, sans-serif" size="1">Use:</font></td>               <td height="19" bordercolor="navy"><font face="Arial, Helvetica, sans-serif" size="1">&nbsp; </font>                        </tr>           </table></td>         </tr>       </table><br>     </td>     </table>     </html>[/code]
  16. My site's www.net-petz.com/home.htm then hit login and both the username and password are test. Then hit My Inventory. That's the first page.
  17. It just comes up with a page cannot be displayed. If I give you the URL and an account to login to would you be able to look at it?
×
×
  • 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.