-
Posts
1,008 -
Joined
-
Last visited
Everything posted by spiderwell
-
echo out the sql statement in the php script to see acopy of exactly what it is that the insert is actually tryin to insert. that should help a lot
-
had mothers day months ago in the UK.
-
a timestamp and sessionid stripped of non alpha numeric chatacters is not a bad one
-
displaying multiple files with seperate topic names
spiderwell replied to friedice's topic in PHP Coding Help
should be pretty straight forward, use <h> tag for title then plonk the 3 files into a <ul> or <ol> -
i agree with above, i do all my php execution before <html> just saves a lot of bother
-
my suggestion is to scrap trying to save the image in the database and just save all images in a directory.
-
2 queries inside same while statement?
spiderwell replied to xwishmasterx's topic in PHP Coding Help
nice i didn't know you could do that! -
as stated, in html there is a base tag which is probably going to achieve what you want. read this to learn more
-
That's not IE's fault! I blame IE for everything, even the weather
-
2 queries inside same while statement?
spiderwell replied to xwishmasterx's topic in PHP Coding Help
in short it wont work as the second dataset will replace the first as you pass it to the same variable. are you able to use a JOIN statement in your sql to get it all in one go? -
i think what you want is this: mypage.php is only viewable when logged in. so on that page have the session start, check if the session holds the username and/or hashed password. personally i would suggest just the presence of username in the session is enough to 'pass the test'. if that is found let the page execute, else unset/kill the session and redirect away back to the login
-
frustration? lol basically certain functions in php will not work if parts of the page have been sent to the browser, so you have to 'buffer' the output to prevent this.
-
i think you are being confused by a column that is called timestamp and one which its datatype is set as time stamp. which is not surprising since the original response has a column called timestamp. a datatype as a timestamp is somewhat different to a datatype that is date. timestamp data will auto update unless you tell it not to, whereas a date data wont. have a look here for more info on timestamp i would suggest that you use a date as the datatype and not timestamp as the datatype. perhaps call the column expires or something else to avoid confusion?
-
im not quite sure i follow what you are saying. does beginhere/index.php, have an include folder thats located up one level? or does it redirect instead of include? the html points to one directory down - i have no idea what this means!
-
what do you get when the page executes and you view source?
-
cant get cheaper than free (awaits the smartarse to come tell me what if someone pays you to use an antivirus)
-
whats in the database is just a string with what 'looks' like a php variable, php wont recognise it, you would have to use str_replace() to put your actual $rand variable into that string. then it should echo out correctly
-
I was a bit confused by his retrieve example because it's saying "timestamp > NOW()". I don't want to select the timestamp that's greater than now. I'm basically wanting to create a timer and I'll be checking my database every minute to check and see if any timers have expired. By using "timestamp > NOW()" isn't that going to select everything then since it would all be set 4 hours and 10 minutes into the future? the example given selects anything with the column called timestamp set in the future from the time the sql select is executed. you want the opposite, which is why i said use less than <, not more than >. there aren't any 'timers' set up really, just a single insert that at the time is 4hours 10 minutes ahead. as the clock ticks (father time is our timer if anything is) that inserted timestamp becomes less and less in the future until, hey presto, 4hours 10 minutes later it becomes present, then 1 second later it becomes the past, and at that point the 'timer' has expired. dont think to hard about it, just do it
-
i just copied your script directly and tried it on my MAMP server and it works as expected, only echoing lolol when you enter create new. here is cut n paste of the log: - Nothing blah new - Nothing - Nothing - Nothing create new - LOLOLO make new - Nothing create moo - Nothing freferf new - Nothing so god knows why you are getting errors!!
-
$imagebytes = $row[image]; should be $imagebytes = $row['image']; @fugix, the upload script appears to be saving the image as a massive string in the database, never seen that before, personally i do what you suggested. only i keep the path in my 'common' include, and save image name in db
-
jcbones answered your question perfectly, if you want to get ones that have expired, use less than instead of more than... did you even try out his example?
-
try onClick its case sensitive also you might need onClick='javascript:locaion.blah...