Jump to content

harrishcris

Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

harrishcris's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. So does anyone have a solution or know a different way of achieving what i want to do...???
  2. No, my query is fine... the code works fine and it adds the shout into the database, but it comes up with the error message...
  3. Also, the shoutbox does actually work, even though the error comes up, it still saves the info to the database...
  4. Hello, I have this script for processing my shoutbox, however it comes up with this error when i click submit: Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/oltvkwrk/public_html/Changeable/Rightside.php on line 104 and row 104 is: // button has been submited so processs data $result = mysql_query("SELECT * FROM shoutbox ORDER BY id DESC LIMIT 1"); [b]while ($row = mysql_fetch_row($result)) {[/b] if ($row[2] != $message) { Here is my full code... [code] // Delte shoutbox row if over 100 $result = mysql_query("SELECT * FROM shoutbox"); $max_shouts = 100; if (mysql_num_rows($result) > $max_shouts){     while (mysql_num_rows($result) > $max_shouts){     $get_last_row = mysql_query("SELECT * FROM shoutbox ORDER BY id asc limit 1");         while ($row = mysql_fetch_row($get_last_row)){         $delete_row = mysql_query("DELETE FROM shoutbox WHERE id=$row[0]");         $result = mysql_query("SELECT * FROM shoutbox");         }     } }          ?>           </span>            <? if (empty($message)) { $message = "No message left."; } if (empty($name)) { $name = "Anonymous"; } if (isset($_POST['submit'])){ // button has been submited so processs data     $result = mysql_query("SELECT * FROM shoutbox ORDER BY id DESC LIMIT 1");     while ($row = mysql_fetch_row($result)) {         if ($row[2] != $message) {          // assign the ip $ip = $_SERVER['REMOTE_ADDR'];    // inserting it into the shoutbox table which we made in the mysql statements before $result = mysql_query("INSERT INTO shoutbox (id,name,message,ip) VALUES ('NULL','$name', '$message', '$ip')"); } } } //returning the last 5 messages $result = mysql_query("SELECT * FROM shoutbox order by id desc limit 10"); //the while loop while($r=mysql_fetch_array($result)) {            //getting each variable from the table    $id=$r["id"];    $message=$r["message"];    $name=$r["name"]; ?>[/code] Any ideas?? Cheers, Chris
  5. Hello, I'm using a paging php script, which then leads to another page and displays the relvant flash movie. However, i cannot figure out how to display the correct size for each flash movie as they are all different sizes... Is there a way of it just loading the flash movie depending on it's size? instead of having to load them all at a certain width and length which will make some of them look stupid. I have tried to just delete the width and length, however it just seems to make them stupidly small...I'm currently using this script: <?php if(isset($_GET['flashview'])) { $pageNum = $_GET['flashview']; } $query = "SELECT id, name FROM flash WHERE id LIKE '$pageNum'"; $result = mysql_query($query); while($row = mysql_fetch_row($result)){ echo " <object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0'> <param name='movie' value='Flash/$row[1].swf'> <param name='quality' value='high'> </object> ";} ?> Any ideas??? Cheers Chris
×
×
  • 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.