Jump to content

Jessica

Staff Alumni
  • Posts

    8,968
  • Joined

  • Last visited

  • Days Won

    41

Everything posted by Jessica

  1. $_SESSION['id'] = $id; and thusly $id = $_SESSION['id'];
  2. Yeah there was supposed to be a br in there. You might want to brush up on the BASICS of HTML.
  3. echo '<option value="' . $row['client'] .'"> ' . $row['client'].'<br />'.$row['code']."</option>\n  ";
  4. Your question doesn't make much sense and your code isn't formatted. Please rephrase and use the code (#) button
  5. [quote author=redbullmarky link=topic=123189.msg508862#msg508862 date=1169247668] [url=http://uk2.php.net/hex2dec]hex2dec[/url] should set you on your way ;) you'll just have to note that each pair in the 6 character hex string amounts to a number, so you will (as far as i know, unless there's another specific function) have to split it up first into 3 parts and then perform the hex2dec conversions. cheers [/quote] In fact, most of the comments on that page deal with this topic.
  6. There is a syntax error here:   echo '<option value="' . $row['client'] .'"> ' . $row['client'] $row['code']."</option>\n  "; change it to   echo '<option value="'. $row['client'] .'"> ' . $row['client'].$row['code']."</option>\n  ";
  7. The images are in a table. By default tables have a cellspacing of 2.
  8. Did you try googling it? I found several results for convert hex to rgb in php
  9. This belongs in the HTML/CSS forum, not PHP.
  10. [quote author=rxbanditboy1112 link=topic=123173.msg508818#msg508818 date=1169241377] Also i think im setting the checkboxes up incorrectly... <input type="checkbox" name="photos_tobedeleted[]" value="<? echo $photo_id;?>" /> for every row it'll display that. Should it instead be photos_tobedelete[$i] ? [/quote] AFAIK the way you already have it, is the correct way.
  11. This is going to cause a problem: unlink($_SERVER['DOCUMENT_ROOT'].'/fileupload/".$deleteing_file_name."'); I think you want to do: unlink($_SERVER['DOCUMENT_ROOT'].'/fileupload/'.$deleteing_file_name);
  12. You only want to delete one row, not the whole table. You're using PHP MyAdmin? Find the row and click the X like micmania said.
  13. Yes, you need to use an array. That's odd that unlink() does not work. Can you post the code and error?
  14. What I'd do it check for the words they are using, and block those words.
  15. if(mail(NULL, $SUBJECT, $BODY, $HEADERS) ) { and it does not error. But the mail never is received at the location I am sending it to. Uhm, what location are you sending it to? You just said you're sending it to NULL which is not an email.
  16. Because the systems I am developing for are normally set to a lower degree of error reporting. Sometimes in a business environment, you don't get to change everything you want to - several times I've had to work on systems with Register Globals on. Did I want it that way? No, but it wasn't up to me. I usually turn error_reporting off once I'm DONE developing, and log errors. When I develop, I turn them back on. I just don't see notices as errors. If they change that in PHP6, I will adapt to it, but still those systems will be using PHP 4 so really, it won't impact me much. As long as I am seeing my ERRORS, I feel it's fine. Chillax.
  17. Check out strtotime() and date()
  18. Eric's version is close. Instead of getting a timestamp, converting to date, then back to time, just do $bkdate = $Year.'-'.$Month.'-'.$Day; if(strtotime($bkdate)<time()){ }
  19. redbull - yeah after some AIM discussion we determined it's a notice, and I have notices turned off (amazingly on every system I've ever used!) I'm stubborn. :)
  20. JJ: You mean "" - As it is now, it's sending the string $id. And actually you'd have an error there. It should be mysql_query("DELETE FROM peopleextensions WHERE ID='$id'");
  21. No problems. You might want to check out an editor like textpad which does syntax highlighting, helps catch those things.
  22. You have a ) at the end of that line, it obviously doesn't belong.
  23. "but which one makes more sense when you read it?" - To me, it's if($x) - I guess it's personal preference. I have error reporting, but not notices, so I've never seen any errors with it, in years of working that way. It really doesn't matter, use isset if you prefer ;)
  24. Why? I've never even seen isset until I saw people post it here, and I've worked for several companies with other people's code. Part of being a "coder" is knowing how to use the manual and look up something you don't know. But leaving it out is pretty obvious. If($x) means if there is $x... if(isset($x)) is throwing in unnecessary functions IMO.
  25. In the future, post the WHOLE error, with the line. change: $MyName= "Welcome, " $_SESSION['IAmAdmin'] "! <a href="logout.php">Logout</a>"; to: $MyName= 'Welcome, '.$_SESSION['IAmAdmin'].'! <a href="logout.php">Logout</a>';
×
×
  • 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.