Jump to content

DeanWhitehouse

Members
  • Posts

    2,527
  • Joined

  • Last visited

Everything posted by DeanWhitehouse

  1. Can a mod make this topic sticky as it will help so many new members. Also Notice: Undefined index:something PHP code <?php //db connection $sql= mysql_query("SELECT * FROM table"); while($row = mysql_fetch_assoc($sql)) { echo $row['something']; } ?> It means that the row is not there, it doesnt exist, but in other cases it will mean that it is not defined (means the same thing) Correct me if i'm wrong
  2. @tmallen Feel free to give advice, but don't tell people they are doing something bad just because it is not how you want it or would of done it, if you wish to educate him/her why did you not explain the good and bad points to using your way instead of just saying that his was is bad. Maybe give him/her a link to a site like w3schools which can explain it better and more indepth. This is nothing personal, just that you shouldn't assume that he/her want's to do something they didn't ask.
  3. I never said it was bad, and tbh we don't need to know what you do for a living nor does it matter. All I am saying is that there is no point for someone (who seems to have little HTML experience, and probably even less if any CSS) to make a style sheet, include it and apply it for one link. If he asked how to do that we would have told him but the fact remains he asked how to make that link black and underlined.
  4. Or he/she may just want this one link to be different? Who know's, it's his/her choice, and doesn't really affect us at all, lolz.
  5. Again you make an assumption, do not say no-body colors links for fun, how do you know that? How do you know he isn't making a site with lots of different color links? Please do not tell people they are doing it badly because they are not being your way. It's his/her website, they can do it how they want. If this is solved, please press solved at the bottom of the screen. Thanks, Blade (p.s. can a mod lock this, it is going off topic)
  6. It's not a bad approach, if he said he wanted all his links to be the same style then we could of shown him how to, and your way is a 'bad' approach, why make an external style sheet, when you can just use internal CSS ? (as it is only doing his links, on one page as far as we know) Please don't jump to conclusions
  7. The correct way <a href="http://www.technomed.co.uk" target="_blank" style="text-decoration: none;color:black;">Testing hyperlink</a>
  8. There seems to be a problem with your file rights, it seems you can no longer write temporary files. You may need to contact your host. At least this is what i think
  9. This really has nothing to do with php, maybe try http://www.phpfreaks.com/forums/index.php/board,14.0.html or http://google.com
  10. This is no longer working in php 5, is there an alternative to it?
  11. How would i go about making one, for example i want to have a form on my site and then when i fill in the search criterea it searches these sites and prints there results, i tried using file_get_contents, but that is slow and prints the whole page, will i need curl and if so can someone show me how to do it?
  12. They are arguing about ajax, he just asked if he can make a drop down list in php, nothing about anything else And he was answered. Btw , if the topic is solved please click topic solved at the bottom of the page. Thanks, Blade
  13. Did he even mention anything about it being dynamic ? No i dont think he did (i hope now i said this), so you are now just having a pointless argument and the same time hacking this persons thread.
  14. <?php //connect first $query = mysql_query("SELECT *FROM table"); echo "<table>"; while($row = mysql_fetch_assoc($query)) { echo "<tr><td>".$row['row_name']."</td></tr>"; } echo "</table>"; ?>
  15. try <?php header("Content-Type: application/vnd.ms-excel"); header("Expires: 0");//and this maybe, just guessing, but do trial and error header("Cache-Control: must-revalidate, post-check=0, pre-check=0");//and this header("Content-Type: application/force-download");// remove this header("Content-Type: application/octet-stream"); // try removing this header("Content-Type: application/download"); // you had 2 ; and remove this header("Content-Disposition: attachment;filename=NAME_OF_FILE.xls "); ?>
  16. It should download it straight away, but im not sure about some of them headers
  17. Your wrong, do you know what HTML is, you can't have any HTML at all before the header for example <?php echo "HTML "; header(); ?> will produce error
  18. Can i assume you didnt read the forum post here at the top about header errors? http://www.phpfreaks.com/forums/index.php/topic,37442.0.html http://www.phpfreaks.com/forums/index.php/board,1.0.html (try looking) Please do But you cannot send a header if there is any HTML outputted before it, or you can cheat and put ob_start(); at the top of the page
  19. I would say this one is better <?php $search= "%".$_REQUEST["search"]."%"; SELECT * FROM tablename WHERE moviefield LIKE '$search'; ?> But up to you, depends how you want the search.
  20. [code[ <?php //connect first $query = mysql_query("SELECT *FROM table"); while($row = mysql_fetch_assoc($query)) { echo $row['row_name']; } ?>
  21. <?php $_PHP_SELF ?> should be <?php echo $_SERVER['PHP_SELF']; ?>
  22. maybe change foreach($arr as $key => $value) to foreach($arr as $key) or not?
×
×
  • 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.