wildteen88
Staff Alumni-
Posts
10,480 -
Joined
-
Last visited
Never
Everything posted by wildteen88
-
if you are getting a Parse error you need to fix that otherwise your script will fail to work properly
-
PHP 5.1.6 and Apache 2.2.3
wildteen88 replied to Jay2391's topic in PHP Installation and Configuration
PHPIniDir needs to be on its own line: [code]LoadModule php5_module "C:/php/php5apache2.dll" PHPIniDir "C:/WINDOWS"[/code] -
Upgraded to PHP5 now can't get mail to work!
wildteen88 replied to Conjurer's topic in PHP Installation and Configuration
I usually add that line after the LoadModule section. However it doesnt matter where you put it. Glad you got it all working now. -
You said you had installed Apache. I was asking how you configured Apache to run PHP scripts to the PHP Intepreter (php.exe or php-cgi.exe). Did you configure PHP as an Apache Module or as CGI? If you dont understand what I'm saying then you obviously havnt configured Apache. That why I sent you to [url=http://php.net/manual/en/install.windows.apache2.php]the manul[/url].
-
[SOLVED] parse error, unexpected T_ENCAPSED_AND_WHITESPACE??????
wildteen88 replied to bobleny's topic in MySQL Help
[quote author=bobleny link=topic=109387.msg441277#msg441277 date=1159217065] Thanks that worked... [quote author=wildteen88 link=topic=109387.msg440789#msg440789 date=1159181796]Also I suggest you validate and try to secure the user input too ehn using it in an SQL query. Never trust raw user input. [/quote] I'm not to worried about it. I doubt it will break anything. Me and one other person are the only people who will use it, and he doesn't know anything about PHP, HTML, or MySQL.... [/quote] You dont need to know any PHP, HTML or SQL. All it takes is for you to add a quote (') in to the textfiled. When you go to submit the form. You'll probably get an error or your query will fail to work. As the quote is breaking the SQL query. Look into the following functions: mysql_real_escape_string - help prevent SQL Injection attacks. Help to prevent XSS attacks: htmlentites hmlspecialchars Other function is_numeric - check that a variable is of a numeric value, use this when you ONLY want a numeric value is_boolean - check that a variable is of a boolean value, use this when you ONLY want a boolean value (eg TRUE or FALSE, 1 or 0 etc). Search the following terms: SQL Injection XSS -
Or use CSS: [code]th, td { margin: 0px; padding: 0px; }[/code]
-
Okay. I go it to work how I think you want it: CSS: [code]body { background-image: url('water.png'); background-position: center center; background-attachment: fixed; background-repeat: no-repeat; background-color: #0000ff; margin: 0px auto; } #outer_shell { background-image: url('green.png'); background-position: center center; background-attachment: fixed; background-repeat: no-repeat; background-color: #00ff00; margin: 0px auto; width: 700px; } #inner_left_shell { width: 495px; margin: 0px; float: left; } #inner_right_shell { background-color: #333300; width: 195px; height: 200px; margin: 0px; float: right; } #second_links { color: #000000; line-height: 15pt; word-spacing: 2pt; font-family: courier; text-decoration: underline; font-weight: bold; text-align: center; margin: 3px; } #top_banner { background-image: url('grass.png'); margin: 0px; width: 100%; height: 188px; } p { color: #000000; text-indent: 20pt; line-height: 15pt; word-spacing: 2pt; font-family: courier; margin: 5px; }[/code] HTML/PHP: [code]<?php session_start(); $database_hostname = "localhost"; $database_username = "root"; $database_password = ""; $page = (isset($_GET['page']) && !empty($_GET['page'])) ? $_GET['page'] : 'home'; switch($page) { case 'home': $title = "Home - Welcome To Environmental Class!"; break; case 'mad': $title = "M.A.D. - Makeing A Diffrence"; break; case 'flash': $title = "Flash Movies"; break; case 'Jokes': $title = "Jokes - HA, HA, I Laugh At You!"; break; case 'ge': $title = "Gory Glory Games Galore"; break; default: $title = "Home - Welcome To Environmental Class!"; break; } ?> <!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <link href="css.css" rel="stylesheet" type="text/css" /> <title><?php echo $title; ?></title> </head> <body> <div id="outer_shell"> <div id="top_banner"><H1>Helklo</H1></div> <div id="inner_left_shell"> <p>Welcome to Mr. Crows class, where enviromental science is a thing of the now!</p> <p>Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.</p> <p>Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.</p> <p>Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.</p> <p>Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.</p> <p>Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.</p> <p>Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.</p> <p>Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.</p> <p>Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.</p> <p>Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.</p> <p>Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.</p> <p>Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.</p> <p>Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.Some text. Some text.</p> </div> <div id="inner_right_shell">Related Links</div> <br style="clear: both" /> </div> </body> </html>[/code]
-
In Opera/IE, 3px bottom-padding is added to images
wildteen88 replied to esgarrouth19's topic in CSS Help
Try this as the css for the side bar: [code]#page #body #sidebar{ color:#000; background:#eee; padding: 0 15px 15px 15px; margin:0px; list-style-type:none; border-bottom:1px solid #aaa; border-top:0px solid #aaa; border-right:1px solid #aaa; border-left:0px solid #aaa; -moz-border-radius: 12px; } #page #body #sidebar li{ color:#000; background:#eee; padding-top:15px; }[/code] -
Upgraded to PHP5 now can't get mail to work!
wildteen88 replied to Conjurer's topic in PHP Installation and Configuration
Did you add [code]PHPIniDir "C:/php5"[/code] To the httpd.conf file? I ahve to do that for some reason otherwise it wont read my php.ini file regardless whether I put the php folder into the PATH. -
No ones is saying its "bad". Just people have different opinions on which version of xHTML to use. I tend to use XHTML Transitional rather than XHTML Strict when creating XHTML pages. As long as the text is not on its own between the body tags and is defined in a div or some other tag, eg: [code]<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <title>test</title> </head> <body> <div id="container"> <div id="header"><h1>Some Header</h1></div> <div id="menu">Menu here</div> <div id="content">Hello</div> <div id="footer">Footer</div> </div> </body> </html>[/code] It'll be fine. Sometime I tend to this: [code]<div id="content"> some opening paragrah <p>Secound paragraph</p> <p>Third paragraph</p> Last paragraph </div>[/code]
-
How did you configue Apache to run PHP scripts? You need to configure you server to parse any PHP scripts with the PHP intepreter. You cant just install APache and PHP and think it'll just work. They have to be introduced first. Have a read of [url=http://www.php.net/manual/en/install.windows.apache2.php]the manual[/url] on doing so. I'm moving this to the Installation forum as this is an installation problem you're having.
-
Where is $this->db_conn comming from? Is $db_conn initiated in the class for $connect?
-
If you wnat to chnage the color of the player you'll ahve to edit the .fla file and then compile the fla file as swf to make the chnages, Or if your player has an XML file then prehaps it has options to change the colors of the player in there. Also is this your music player or is a player you have downloaded and installed on your site? If thats the case you'll wnat to contact the developer of the player to see if they can change it for you.
-
Upgraded to PHP5 now can't get mail to work!
wildteen88 replied to Conjurer's topic in PHP Installation and Configuration
Can you confirm that php in using the correct php.ini by running the phpinfo function in a php script. Does the Configuration File (php.ini) Path refelect the correct path to the php.ini you are editing? If it does the does the SMTP (scroll down until you find SMTP in the PHP Core section) row reflect the changes you made to php.ini? If they dont then PHP is not using the php.ini file you're edting. -
Upgraded to PHP5 now can't get mail to work!
wildteen88 replied to Conjurer's topic in PHP Installation and Configuration
Make sure you have restarted the server when you changed the SMTP server details in the php.ini -
I forgot the test var. This is what my example should be: [code=php:0]$test = 'myvar'; $num = 1; ${$test. $num} = 'blah blah'; // echo the variable that was created above. echo $myvar1;[/code] However its stull the same. Just that I had myvar 'hardcoded' in.
-
Do you want to create a variable which is called what $test holds and add $num to the name. For example: $test - holds myvar $num - holds the number 1 You can to create a variabled valled myvar1 You'll do this: [code=php:0]${'myvar' . $num} = 'blah blah'; // echo the variable that was created above. echo $myvar1;[/code]
-
No. As that doesnt fully turn of magic_quotes. that prevents magic quotes from escaping quotes in user input (GET, POST, COOKIE etc). It will not prevent magic quotes from escaping quotes that are in a string that is being retruned form a function. The only way to prevent this is to turn of magic_quotes_runtime in the php.ini, server config file or the .htaccess file.
-
Look in to the pesudo classes/elements too.
-
htmlentites shouldn't be doing that. Looks your server has setting called magic_quotes enabled. Which automatically escapes quotes returned from a function or user input. You're best of disabling magic_quotes either by editing the php.ini if you can. or by adding the following: [code]php_flag magic_quotes_gpc Off php_flag magic_quotes_runtime Off php_flag magic_quotes_sybase Off[/code] To a .htaccess file in your servers document root.
-
Or add a .htaccess file in to the scripts folder and add the followingto the htaccess file: [code]Options -Indexes[/code] When you go to the scripts folder the user will get the [b]403 Forbidden[/b] error message
-
problem with is_numeric() or I am using it wrong
wildteen88 replied to Ninjakreborn's topic in PHP Coding Help
You cannot add a dollar sign and pass that through the is_numeric function . is numeric only accepts numbers, optional decimal point, optional exponential part and few other number specific characters. First you'll wnat to loose the dollar sign and then pass it through the function and then add the dollar sign backin. -
$this->query should be $query on this line: [code=php:0]$result = mysql_query($this->query, $this->db_conn);[/code] So it should be this: [code=php:0]$result = mysql_query($query, $this->db_conn);[/code]
-
Cannot send session cache limiter - headers already sent
wildteen88 replied to Mutley's topic in PHP Coding Help
Due to the nature of what you're doing. You'll want to use output buffering. So add ob_start(); before the opening php tag and ob_end_flush(); before the closing php tag. So your code should now be like this: [code=php:0]<?php ob_start(); $title = "Forum"; $sideplans = "no"; include('inc/header.php'); include('forum/index.php'); include('inc/footer.php'); ob_end_flush(); ?>[/code] -
Not sure but prehaps look into the [url=http://uk.php.net/manual/en/function.exec.php]exec[/url] function.