WebCheez
Members-
Posts
30 -
Joined
-
Last visited
Never
Everything posted by WebCheez
-
Thank you! Works great.
-
First suggestion: use body instead of html for your formatting. Like: <style type='text/css'> html{ font-size: 300%; } </style> Even so, you should just delete that at the beginning so the font size will be variable. if($_SESSION['FontSize']=='') { ?> <style type='text/css'> body { font-size: 100%; } </style> <?php } The browser doesn't know that the <style> is in an if statement. Any thing that is not in the <?php ?> tags is ignored by PHP, but even if you didn't drop out of PHP. I would suggest: if(!isset($_SESSION['FontSize'])) { echo '<style type='text/css'> body { font-size: 100%; } </style>'; } That will output your style to the browser, so it's interpreted only when FontSize is blank. I also added an isset so that it checks if the variable is not set, rather than if it is blank. There may be a few other errors, I'm not sure; I'm no expert.
-
When I run that, it says this when I print the error. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'delete DAY)' at line 1
-
I have a table with several fields, one of which is an amount of days after which the row will be deleted. Every time the script is run, I want to check for old entries and delete them. How would I do this?
-
I'm trying to send some POST data to a page and then get the contents of it. The page is not on my server, so I can't use Sessions or GET. Google hasn't provided me with a definite answer. How would I do this?
-
So once I have that, what do I do?
-
Nope. *goes to create one*
-
How would I make a script that would delete any row in a MySQL table that was more than 7 days old?
-
You can't. But quart containers don't have scrollbars.
-
Oh, looks like the .gif extension was capitalized so it was .GIF. I got it to work.
-
The following displays no image: body { background-color: #000000; background-image: url('code.gif'); background-repeat:no-repeat; } I made sure that code.gif exists, so what's going on here??
-
PHP bible is a good one.
-
Sorry for the late reply, and thanks!
-
Oh, crap, how do you do this when there's PHP in the code?
-
Oh. Oh well, even though it's depriciated, it still works, for now, at least. I would change it if I hadn't just coded a whole bunch of stuff.
-
Nah, I like eMonk's way better, it's simple. Is that PHP, PFM? Thanks.
-
How would I make an HTML page look somewhat like this?? HTML Tutorial Here's a basic HTML page: <html> <head><title>HTML page of HTML pageiness.</head> <body> <p>HTML PAGE!!!!!!!!!!!!111!!1111111111111111!!1111111111!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!1!1one!!1!!!!!111!!!!!</p> <h1>PIE!!!!!</h1> </body> </html> Like, actually displaying HTML code without rendering it into fancy looking stuff.
-
Wait a minute... It outputs: Resource id #6
-
*jumps off a bridge* Wow... that is the most epicly I have failed in my LIFE! I knew you were supposed to put the WHERE there, I could have SWORN that I did... but I didn't. Thanks. P.S. Wow... while I was typing two people posted new replies.
-
So, I'm working on a quiz system. The text and choices are stored in a MySQL database. I haven't gotten to the choices yet, I'm still having trouble with the text. Here's my code: $querytext = "SELECT text FROM quiz id = '$prob'"; $result = mysql_query($querytext) or die(mysql_error()); echo $result; Yes, I'm already connected and stuff, that's just the snippet. I made sure that $prob is 1. Here's the MySQL Error I'm getting: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '= ''' at line 1 I've looked all over the web and through the MySQL/PHP section of a 991-page PHP book. What am I doing wrong? I bet that I really, really failed epicly this time, but I never catch my epic fails and have to ask questions about them in order to fix the problem. So please reply
-
Oh, woops, I fixed it. Looks like I'll have to redefine my method of telling if the previous question was correct. Thanks for your help.
-
How else would I do this? I do need all of the radio button options, and the question itself. MySQL? It's trying to redirect to the wrong page, it's supposed to be redirecting to question2.php. And yes.
-
The following block of code won't work. $prob = $prob + 1; $_SESSION['prob']=$prob; header( 'Location: question' . $prob . '.php' ); This is just a small part of my script. I've made sure using print that $prob is 1 and is changed to 2. HOWEVER it gives me an error 404 page at question3, not question2. I'm trying to make a quiz system.
-
woops, I also forgot: the directory cheese is not in the directory of the script. It's in the public_html directory. Should I try to create it in www.mysite.com/cheese/ ?