Jessica
Staff Alumni-
Posts
8,968 -
Joined
-
Last visited
-
Days Won
41
Everything posted by Jessica
-
$_SESSION['id'] = $id; and thusly $id = $_SESSION['id'];
-
Yeah there was supposed to be a br in there. You might want to brush up on the BASICS of HTML.
-
echo '<option value="' . $row['client'] .'"> ' . $row['client'].'<br />'.$row['code']."</option>\n ";
-
Your question doesn't make much sense and your code isn't formatted. Please rephrase and use the code (#) button
-
php function to convert "FF" to "255"?
Jessica replied to michaellunsford's topic in PHP Coding Help
[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. -
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 ";
-
The images are in a table. By default tables have a cellspacing of 2.
-
php function to convert "FF" to "255"?
Jessica replied to michaellunsford's topic in PHP Coding Help
Did you try googling it? I found several results for convert hex to rgb in php -
This belongs in the HTML/CSS forum, not PHP.
-
[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.
-
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);
-
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.
-
Yes, you need to use an array. That's odd that unlink() does not work. Can you post the code and error?
-
What I'd do it check for the words they are using, and block those words.
-
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.
-
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.
-
Check out strtotime() and date()
-
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()){ }
-
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. :)
-
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'");
-
No problems. You might want to check out an editor like textpad which does syntax highlighting, helps catch those things.
-
You have a ) at the end of that line, it obviously doesn't belong.
-
"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 ;)
-
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.
-
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>';