if(isset($_SESSION['user_id']) && ((int)$_SESSION['user_id'] === (int)$_GET['id'])) { // if session exists and is === $_GET['id']Seems strange to me though - Thanks for your help.
Search found 50 matches
- Thu Oct 13, 2011 7:30 pm
- Forum: PHP
- Topic: === and ==
- Replies: 5
- Views: 1096
Re: === and ==
No appears to be the answer using
- Thu Oct 13, 2011 7:25 pm
- Forum: PHP
- Topic: === and ==
- Replies: 5
- Views: 1096
Re: === and ==
Hi Libeco, I know it checks the type which is why it confused me, I'm setting the $_SESSION which is in the code already posted and the $_GET['id'] is already validated to be an integer. So as they are not treated as the same if i use the (int) on them won't it just set the "non-integar" v...
- Thu Oct 13, 2011 7:08 pm
- Forum: PHP
- Topic: === and ==
- Replies: 5
- Views: 1096
=== and ==
I was just using this code to validate a $_GET variable against a session user_id and I noticed that when I use the '===' it fails as if to say they are not equal but the '==' says they are equal. I know the difference between them but I don't understand why === fails. Does anybody know if(isset($_G...
- Thu Oct 13, 2011 7:02 pm
- Forum: PHP
- Topic: difference in these queries
- Replies: 2
- Views: 679
Re: difference in these queries
Thanks Libeco
- Thu Oct 13, 2011 5:45 pm
- Forum: PHP
- Topic: difference in these queries
- Replies: 2
- Views: 679
difference in these queries
Hi, I was just wondering what is the difference between these 2 queries (if any) if(isset($_GET['a']) && (strlen($_GET['a'])) == 32 && (ctype_alnum($_GET['a']))) { //****** AND ********// if(isset($_GET['a']) && strlen($_GET['a']) == 32 && ctype_alnum($_GET['a'])) { I...
- Wed Oct 12, 2011 11:39 pm
- Forum: SQL
- Topic: MYSQL client
- Replies: 8
- Views: 4109
Re: MYSQL client
Yeah - thanks Jacek 

- Wed Oct 12, 2011 9:23 pm
- Forum: SQL
- Topic: MYSQL client
- Replies: 8
- Views: 4109
Re: MYSQL client
I think it might have been because i'm storing the password in binary so that's why the client didn't return the row when using the password value. Not sure though, thanks for the help.
- Tue Oct 11, 2011 8:32 pm
- Forum: SQL
- Topic: MYSQL client
- Replies: 8
- Views: 4109
Re: MYSQL client
Hmm, still the same, I'm at a loss.
This is as simple I can make the query and it still fails
This is as simple I can make the query and it still fails
SELECT `firstName` FROM `users` WHERE `password` = '544sd4a5d4as5d4fsd4f'
- Tue Oct 11, 2011 8:01 pm
- Forum: SQL
- Topic: MYSQL client
- Replies: 8
- Views: 4109
Re: MYSQL client
Yeah I did try that, same result. I don't know whether to be pleased that i'm not going mad or disappointed that it isn't just an oversight. I don't see what's wrong with the pword column :S
- Tue Oct 11, 2011 7:49 pm
- Forum: SQL
- Topic: MYSQL client
- Replies: 8
- Views: 4109
MYSQL client
Hi, I'm driving myself mad here, I've written a login script which isn't working so I thought I'll go into my PHPmyAdmin and use the client. My email and username return no results using this query: SELECT id, firstName FROM users WHERE (`email` = 'myemail@example.com' AND `password`= '544sd4a5d4as5...
Re: Video
Thanks for your help Jacek 

Video
I've never really used video before and with iphone/ipad etc outlaw on flash I'm just thinking of the best way to do something. I want to build your standard site, but registered people get a new part of the website that is private where they can view some of my videos. I was just thinking what's th...
- Sun Aug 14, 2011 1:55 am
- Forum: CSS / Styling
- Topic: LinkedIn style menu bar
- Replies: 4
- Views: 3293
Re: LinkedIn style menu bar
Thanks for your help earlier, I'm actually pretty close to accomplishing it. I've got a couple of snags though that I hoped somebody might be able to put me straight on. I'm going to paste my HTML and CSS for closer inspection (apologies as it's fairly long for something like this) <div id="men...
- Sat Aug 13, 2011 2:47 pm
- Forum: CSS / Styling
- Topic: LinkedIn style menu bar
- Replies: 4
- Views: 3293
Re: LinkedIn style menu bar
ahhh ok, thanks Jacek.
I'll give it a whirl - thank you
I'll give it a whirl - thank you
- Sat Aug 13, 2011 2:29 pm
- Forum: CSS / Styling
- Topic: LinkedIn style menu bar
- Replies: 4
- Views: 3293
LinkedIn style menu bar
Morning, CSS is not my favourite thing but I'm alight at it (just about :d). I'm trying to build a LinkedIn style menu bar which looks like this in case you don't know. http://i53.tinypic.com/w2im0z.png I'm just trying to think about the logic behind it. And wanted some idea if this is the right log...
- Fri Jul 29, 2011 2:59 pm
- Forum: SQL
- Topic: decimal places is mysql
- Replies: 2
- Views: 971
Re: decimal places is mysql
How silly
Thanks

Thanks

- Thu Jul 28, 2011 9:53 pm
- Forum: SQL
- Topic: decimal places is mysql
- Replies: 2
- Views: 971
decimal places is mysql
Hello I'm inserting some data from a CSV and loading the file through MYSQL. Which works fine, but i have some longitude and latitude values with 5 decimal places, but every time I insert the file, the decimal places get stripped to 2 decimal places. I've been through my CSV and formatted all the de...
- Thu Jul 07, 2011 10:30 pm
- Forum: PHP
- Topic: best way to pas $var from image gen to script
- Replies: 5
- Views: 1123
Re: best way to pas $var from image gen to script
Hmmm, yes i thought that i'd possibly have to go down the session route. Thanks for your help Jacek, I'll get on the session approach 

- Thu Jul 07, 2011 6:18 pm
- Forum: PHP
- Topic: best way to pas $var from image gen to script
- Replies: 5
- Views: 1123
Re: best way to pas $var from image gen to script
I'm not sure its possible the way I have it set up.
My verify.php file generates the random string
In my contact.php file within the <form> tags i call the script as an image so:
<img src="verify.php" />
So on that basis I can't validate the input can i? :s
My verify.php file generates the random string
In my contact.php file within the <form> tags i call the script as an image so:
<img src="verify.php" />
So on that basis I can't validate the input can i? :s
- Thu Jul 07, 2011 4:15 pm
- Forum: PHP
- Topic: best way to pas $var from image gen to script
- Replies: 5
- Views: 1123
best way to pas $var from image gen to script
I've built a random generated captcha for a contact form, so It creates a random 5 letter string and then creates an image. I then call this script as an image source from my contact page. But I need to verify the correct input of the captcha. I'm using a self verifying contact form so contact.php p...
- Thu Jul 07, 2011 1:21 pm
- Forum: JavaScript
- Topic: browser detection
- Replies: 7
- Views: 1785
Re: browser detection
Hmmm, it would appear that I chose to ignore that link. Possibly because it had quirks mode in the url.
thanks
