Jump to content

AndyB

Staff Alumni
  • Posts

    5,465
  • Joined

  • Last visited

    Never

Everything posted by AndyB

  1. You can't pull some html code randomly! The example below would have California 'pre-selected' in the dropdown <select size="10" name="menu"> <option selected value="" >Select A State</option> <option value="New York">New York</option> <option value="California" select='selected'>California</option> <option value="Florida">Florida</option> <option value="Rhode Island">Rhode Island</option> </select> I did say
  2. If you check the generated code, you'll see: <link rel="stylesheet" type="text/css" href="theme//visus.css"> That shows clearly that the value of $theme is not present and so is being interpreted as nothing. The problem (still) lies with how you're getting $theme
  3. <link rel="stylesheet" type="text/css" href="theme/<?php echo $theme;?>/visus.css">
  4. Assuming your list of states is in an array (anything else is deranged), as you use php to loop through the array to generate the dropdown options, add select='selected' to the option value that matches the pre-selected state.
  5. Yes. See the manual for date() at http://ca.php.net/manual/en/function.date.php
  6. Change: if('$mail,$to,$subject,$message,$headers'){ to: if($mail,$to,$subject,$message,$headers){
  7. See http://ca.php.net/manual/en/function.getimagesize.php and use the third array element for height/width And it's a php issue, not MySQL. so I'll move it for you.
  8. Let's fix the first one properly: <?php $host="localhost"; $username="wowdream_domaine"; $password="PASS"; $db_name="wowdream_domaine"; $tbl_name="maintenance"; mysql_connect("$host", "$username", "$password")or die("cannot connect"); mysql_select_db("$db_name")or die("cannot select DB"); $sql="SELECT * FROM $tbl_name"; $result=mysql_query($sql); while($rows=mysql_fetch_array($result)){ if ($rows['check'] == yes) { echo "<a href='turnmaintenanceoff.php'>Turn maintenance mode off</a>"; } else { echo "<a href='turnmaintenanceon.php'>Turn maintenance mode on</a>"; } } ?> Note how proper indentation makes it obvious that you were a closing brace short in your code.
  9. if ($rows['check'] = yes) { should be if ($rows['check'] == yes) {
  10. In 11 minutes you can check most of 37,000 links. At that rate you could have checked more than a quarter million links since you posted. If I couldn't find what I wanted after checking a quarter of a million links, it's probable that I'd give up and move on. Wish you luck in your quest.
  11. I wasn't kidding about this. The ; does not belong.
  12. http://www.google.ca/search?q=listbox+tooltips+%2B+javascript&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-GB:official&client=firefox-a 37000 links. Enjoy.
  13. You checked the google listings in the link I gave and none of them were what you wanted? That's hard to believe.
  14. if($row['check']; == yes) { is wong if($row['check'] == yes) { is good
  15. http://www.tizag.com/mysqlTutorial/ - spend a few minutes there and you be fine.
  16. One thing for certain. This has nothing to do with php! You actually want to display a tooltip in your generated HTML code. When all else fails ... http://www.google.ca/search?q=listbox+tooltips&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-GB:official&client=firefox-a
  17. Improved variant: if ($type=="Debit") { $amount = 0 - abs($amount); } Generates a negative value for $amount even if the user mistakenly places a negative sign before their input debit value.
  18. $res=mysql_query($sql) or die ("Sorry, it did not work!"); Spectacularly unhelpful! Instead, try: $res=mysql_query($sql) or die ("Error: ". mysql_error(). " with query ". $sql); Ah! Now you know the error that occurred AND you know the querystring where it failed. Then you can see what the real problem is.
  19. This is not your personal chat line!! If you want to learn, you need to start by doing something on your own instead of holding out your hands. Spend time at www.tizag.com then come back and post some code you have created. Ask a relevant, coherent question and you'll probably get an answer. This thread is getting very close to being locked.
  20. if ($_POST['_submit_check']){ $defaults = $_POST; // this makes no sense
  21. CSS solutions - cross-browser, etc. Take your pick ... http://www.cssjuice.com/25-rounded-corners-techniques-with-css/
  22. Which bit of what I posted is confusing you? It's your code, properly indented for legibility and with loops closed.
  23. So we're perfectly clear: <?php if($nume<0) { while ($data = mysql_fetch_assoc($query)) {?> <tr bgcolor=#EEEEEE> <tr style="background-color:#EAEAEA;" onmouseover="this.style.backgroundColor='#0099FF'" onmouseout="this.style.backgroundColor='#EAEAEA'"> <td><?php echo "{$data["login"]}"?></td> <td><?php echo "{$data["fname"]","{$data["lname"]}"?></td> <td><?php echo "{$data["hub"]}"?></td> </tr> <?php } ?> </table> <?php } ?>
  24. One problem is the statement while($data = mysql_fetch_assoc($myquery){?> because $myquery is never defined, and it's a closing bracket short at the end.
×
×
  • 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.