Jump to content

yeshuawatso

New Members
  • Posts

    7
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

yeshuawatso's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hello all. I had a question regarding file permissions when including or requiring files in my scripts. Does PHP require that the included file have read and execute permissions (e.g. 755) or can it use the files for reading and parsing only(e.g. 744)? Thanks, Yeshua
  2. Needing a little help trying to create a table: Here's the code: [code]   if($genre != ''){   $genre_query = mysql_query($get_genre) or die("<b>A fatal MySQL error occured</b>.\n<br />Query: " . $get_genre . "<br />\nError: (" . mysql_errno() . ") " . mysql_error());   $file = 'empty.tx'; /*?>*/ echo "<table width=\"555\" height=\"336\" border=\"1\" style=\";\">\n"; echo "<tr>\n"; $mv_cnt = 0; while($r=mysql_fetch_array($genre_query)) {   // $mv_cnt = 0;   $mv_cnt = $mv_cnt+1;   echo $mv_cnt."movie_count <br />";   echo "<td width=\"111\"><div align=\"center\"><a href=\"page_13003.php?q=".$r['id']."\"><img src=\"../videodb/cache/img/".md5($r['imgurl']).".jpg\" width=\"93\" height=\"140\" border=\"0\" /></a></div></td>\n";   if($mv_cnt == 5 or 10 or 15 or 20 or 25 or 30 or 35 or 40)   { $nm_cnt = 0; echo    "</tr>\n"; echo        "<tr>\n"; //mysql_data_seek($genre_query, $mv_cnt+1); //reset();   while($r=mysql_fetch_assoc($genre_query))   { echo "<td><div align=\"center\"><a href=\"page_13003.php?q=".$r['id']."\">".$r['title']."</a></div></td>\n"; $nm_cnt = $nm_cnt+1; echo $nm_cnt."name_count <br />"; if ($nm_cnt >=5) { echo      "</tr>\n"; echo "<tr>\n"; $nm_cnt = 0; mysql_data_seek($genre_query, $mv_cnt-1); break; }     } } } echo    "</tr>\n"; echo      "<tr>\n"; echo    "<td height=\"23\" colspan=\"2\">Search \n   <input type=\"text\" name=\"textfield\" /></td> \n <td colspan=\"2\"><div align=\"center\"><a href=\"page_13003.php\">Back to Category Search </a></div></td> \n   </tr> \n   <tr> \n <td height=\"23\"><span class=\"style2\">&lt;-- Previous page </span></td> \n <td height=\"23\" colspan=\"2\"><div align=\"center\" class=\"style2\">1 2 3 ..... 8 9 10 </div></td> \n <td height=\"23\"><div align=\"right\" class=\"style2\">Next Page ==&gt;</div></td> \n   </tr> \n   </table> \n "; } [/code] The code you see is very vague but it's where the root of my problems are. I'm trying to execute 2 while loops (one inside the other) so I can construct a table that has two rows, one of an image and  one of a text link. |-------------| |Pretty Image | |@@@@@@@| |@@@@@@@| |@@@@@@@| |-------------| |Some Text    | |-------------| The results I've come up with so far either cause the text rows to line up correctly and the images to space out as individual rows (what you see now); The images line up correctly and no text at all. Or the images and the text line up, but the text doesn't match the image. For instance, the image may be of some movie called dogs, cats, cows, chickens, horses. And the text underneath it would be crows, sheeps, goats and pigs. The text is what is in the data base, but in is what is left after the first loop stops. So if the data for the image is cats and dogs and then stops, then the text would pick up at cows chickens and horses. The table is supposed to be 5 columns of these tables, and I have yet make this work correctly. Any help or point to manuals would be great. Thanks, Yeshua
  3. Ok, this works for different variables, but does the same function work for the same variable? [code]if($a == $b || $a == $c ||etc.){return true or false or whatever I need it to do here.}[/code]
  4. Does PHP support multiple "ors" for instance if(something != somthing or somthing or something or something){ } I know my other option is using else ifs, but I want to see if I could get this in one line of code. THanks, Yeshua
  5. See I knew it couldn't be to hard. Thanks [img src=\"style_emoticons/[#EMO_DIR#]/laugh.gif\" style=\"vertical-align:middle\" emoid=\":laugh:\" border=\"0\" alt=\"laugh.gif\" /]
  6. Have you tried adding the prefix in manually to see if it will update then? Replace the prefix with the actual prefix and test it out.
  7. Well if you've read the description I'm needing help rounding time off. At first I was thinking of round(time(), 1800). But after a few glances, I noticed that that wouldn't work and if it did, it would round 1800 seconds not to the nearest half hour which is what I'm trying to do. I want to go by the servers time for this particular function, but I just can't seem to get my head wrapped aroung about how to do this properly. Let's say that it is currently 5:18pm, I am wanting the script to determine if the display time should be 5:00pm (when before 5:15) and 5:30 when after 5:15. Thanks for any advice. Yeshua
×
×
  • 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.