Jump to content

paulman888888

Members
  • Posts

    332
  • Joined

  • Last visited

    Never

Everything posted by paulman888888

  1. can someone please help make a script that will echo the ipaddress which is same to the gameid. eg http://somewhere.com/index.php?gameid=21 i would like it to find the gameid in mysql table and echo the ipaddress. Thankyou for all the help Paul
  2. i get this error. Theres an error. Please try again. So what part have i done wrong? thankyou
  3. Please can you cheak it. Thankyou <?php require('connect.php'); ?><?php // Get all the data from the "intobattle1" table $result = mysql_query("SELECT * FROM intobattle1 ORDER BY id DESC") or die('O no. Theres an error'); // keeps getting the next row until there are no more to get while($row = mysql_fetch_array( $result )) { // Print out the contents of each row into a table echo $row['id'] "---"; echo $row['name'] "---"; echo $row['players'] "---"; echo $row['thedate'] "---"; echo $row['thetime'] "---#";//i think the --- part is wrong } ?> thankyou Paul
  4. I know its something to do with the quotes, i dont understand them. thankyou
  5. <a href="#" onClick="history.go(-1)">replace this will the text you want</a>
  6. How do i make my script echo the time? I have been looking at some examples and they echo out long numbers. How do i get it to show something like this? 14:21 the above time is a 24 hour clock and it 21 mins past 2. Is it better to use the datetime function because i would like the time as well. Thankyou for the help
  7. sorry am confused. I didnt use the while function or loop so i thought it should only put out 1 ipaddress. Ill scrap that code then. Ill start again. I got my table intowar1, i would like it to pull out and echo the latest ipaddress, (i do have a column called id that is an auto number if that helps, highest number is the newest). Then delete that row straight after. Can someone please make an example please.
  8. please can someone tell me what i have done wrong. I would of liked it to echo just the 1 ipaddress then delete it but i have done something wrong. Below is me code. <?php include("connect.php"); ?> <?php $query = "SELECT * FROM intowar1"; $result = mysql_query($query) or die("ERROR LEVEL 3"); $row = mysql_fetch_array($result) or die("ERROR LEVEL 4"); echo $row['ipaddress']; mysql_query("DELETE FROM example WHERE ipaddress=$row['ipaddress']") or die("ERROR LEVEL 5"); ?> Please help me fix it. Thankyou
  9. have i got to do the same with this one as well? <?php include("connect.php"); ?> <?php $query = "SELECT * FROM intowar1"; $result = mysql_query($query) or die("ERROR LEVEL 3"); $row = mysql_fetch_array($result) or die("ERROR LEVEL 4"); echo $row['ipaddress']; mysql_query("DELETE FROM example WHERE ipaddress=$row['ipaddress']") or die("ERROR LEVEL 5"); ?> and the error code Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/www/something.com/something.php on line 11
  10. I get this 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 '.175.53, 06.20.08)' at line 2 and this is my code <?php include("connect.php"); ?> <?php $ipaddress =$_SERVER['REMOTE_ADDR']; $thedate = date("m.d.y"); mysql_query("INSERT INTO intowar1 (ipaddress, thedate) VALUES($ipaddress, $thedate)") or die(mysql_error()); ?> Please can you tell me what i have done wrong? Thankyou paul
  11. I have a script that i am going to give out. I would like that script to contact my site for a few reasons, 1 being updates, and the 2nd i would like to know when people are useing my script. So can i do something like this? <?php require('http://www.somesite.com/something.php'); ?> Thankyou for all the help Paul
  12. read there help information. Its more there side not php.
  13. can you add a joined colunm? when joined a manerger joined = 1 else 0 Something like if joined = 1 then {code here saying already joined} else {Code here saying how to join} Thats used rough. Hope that helps
  14. I would like a script to get the full url of a page. eg http://something.com/somefolder/somefile.php and the php script would pick up the full url from http all the way to .php. Please can you help Thankyou
  15. i still get an error. I have never done a php upload script before and i am still getting errors. Am i missing a simple problem again?
  16. this may sound silly but did you make the connection to your database first. Secondi think this is right Put the same code in to your javascrit code as well. hope that helps
  17. I have my php script but i get an error. I think i have more than one error. This is one error i get Parse error: parse error, unexpected T_VARIABLE in /home/www/somesite.com/joinus3.php on line 10 This is my full code <?php $date = date("y/m/d"); // Where the file is going to be placed $target_path = "joinus/" $date"/"; //this is line 10 /* Add the original filename to our target path. Result is "uploads/filename.extension" */ $target_path = $target_path . basename( $_FILES['uploadedfile']['name']); $_FILES['uploadedfile']['tmp_name']; if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) { echo "The file ". basename( $_FILES['uploadedfile']['name']). " has been uploaded"; } else{ echo "There was an error uploading the file, please try again!"; } ?> I think one error is my date, and the 2nd error is that the folder doesnt exist, and i dont know how to make my php script to make the folder. Thankyou very much. Paul
  18. Thankyou. It works. Forget my other post i didnt see you post come up till i posted mine. Thankyou. Again wildteen88
  19. ? Pardon I just want to echo out that row from my mysql database I get this error when i try running it. Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/www/somesite.com/info.php on line 17 and line 17 is this while($row = mysql_fetch_array( $result )) and the whole php code is this <?php $id = $_GET['id']; $result = mysql_query("SELECT * FROM friends ROW $id WHERE id = ASC"); echo '<table border="1" width="550">'; echo "<tr bgcolor='#FFFFFF'><th>ID</th><th>Name</th><th>Location</th><th>GO</th><th>Comments</th></tr>"; while($row = mysql_fetch_array( $result )) { // alternate class $class = ($i%2 == 0) ? '#00FF00' : '#00FF00'; $class2 = ($i%2 == 0) ? '#CCCCCC' : '#999999'; // Print out the contents of each row into a table echo "<tr bgcolor='".$class2."' onmouseover=\"this.style.backgroundColor = '".$class."';\" onmouseout=\"this.style.backgroundColor = '".$class2."';\">"; echo '<td><a href="info.php?id='.$row['id'].'">'.$row['id']."</a></td>\n"; echo "<td>".$row['name']."</td>"; echo "<td>".$row['location']."</td>"; echo '<td><center><a href="'.$row['location'].'"><img src="Images/downloadsm.png" /></a></center></td>'; echo "<td>".$row['Comments']."</td>"; echo "</tr>"; $i++; // increment counter } echo "</table>"; ?> Thankyou for all the help
  20. so something like $id = $_GET['id']; $result = mysql_query("SELECT * FROM downloads ROW $id WHERE id ASC"); Is that right?
  21. How can i get my php code to echo out all the information on the same row as id? Eg info.php?id=13 i would like it to echo out all information on row 13. Thankyou
  22. I know theres a prebuilt usermangement script out there but i cant remember what its called. CAn you help please
  23. How do i get my php script to echo all data from the same row as 'id' from a mysql database? Thankyou
  24. i have had ago but i get no luck. I think its because i use mysql as well. anyway heres my code <?php $result = mysql_query("SELECT * FROM downloads ORDER BY id ASC"); $i = 0; // setup a counter echo '<table border="1" width="550">'; echo "<tr><th>ID</th><th>Name</th><th>Download Location</th><th>Size</th><th>Download</th></tr>"; while($row = mysql_fetch_array( $result )) { // alternate class $class = ($i%2 == 0) ? '#00FF00' : '#FF0000'; $class2 = ($i%2 == 0) ? '#FFFF00' : '#316AC5'; // Print out the contents of each row into a table echo '<tr onmouseover="this.style.backgroundColor = "'$class'";" onmouseout="this.style.backgroundColor = "'$class2'";">'; echo "<td><a href='info.php?id=".$row['id']."'>".$row['id']."</a></td>\n"; echo "<td>".$row['name']."</td>"; echo "<td>".$row['location']."</td>"; echo "<td>".$row['Size']."</td>"; echo '<td><center><a href="'.$row['location'].'"><img src="Images/downloadsm.png" /></a></center></td>'; echo "</tr>"; $i++; // increment counter } echo "</table>"; ?> And i keep getting errors. Thankyou everyone
×
×
  • 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.