wildteen88
Staff Alumni-
Posts
10,480 -
Joined
-
Last visited
Never
Everything posted by wildteen88
-
String Comparison -- How to return similar strings?
wildteen88 replied to kjtocool's topic in PHP Coding Help
MySQL supports Wildcards within queries, -
This line has invalid syntax: if($check_name_length >= 30); || if($check_message_length >= 250); It should be: if($check_name_length >= 30 || $check_message_length >= 250)
-
Apache 2.2.8 cannot run when I specificy VirtualHost s
wildteen88 replied to edb's topic in Apache HTTP Server
When setting up Virtualhosts on Apache I found this tutorial usefull. Also to see why Apache is not starting up it should log the error in Apaches error log. -
You'd use $this->classAFunction
-
wamp configration with IIS help urgent
wildteen88 replied to mizraabi's topic in PHP Installation and Configuration
When wamp is installed you need to save your php file to C:\wamp\www then you open your browser and go to http://localhost to run them (make sure IIS is not running at the same time as WAMP). -
Fairly Simple: $fullString = null; if(isset($_POST['Firstname']) && !empty($_POST['Firstname'])) { $fullString .= $_POST['Firstname'] . ' '; } if(isset($_POST['Lastname']) && !empty($_POST['Lastname'])) { $fullString .= $_POST['Lastname'] . ' '; } if(isset($_POST['CompanyName']) && !empty($_POST['CompanyName'])) { $fullString .= $_POST['CompanyName']; } echo $fullString;
-
wamp configration with IIS help urgent
wildteen88 replied to mizraabi's topic in PHP Installation and Configuration
By WAMP do you mean you have installed the WAMP package from wampserver.com? If you have then why do you need IIS? You cannot run IIS and Apache (comes with WAMP) at the same time. Unless you configure IIS or Apache to use a different port, eg set IIS to port 80 (default) and Apache to run on 8080. IIS will need to be configured to parse PHP scripts. -
if apache installed on winxp, can I delete C:\...\Temp
wildteen88 replied to dsdsdsdsd's topic in Apache HTTP Server
Just install a program called CCleaner to remove junk files from your computer. Deleting files/folder from the Temp folder should not break PHP. PHP should be able to recreate them when it starts. -
The problem is here: I presume $1 is supposed to be $i, corrected code: echo "<a href='veiwentry.php?id=" . $row['id'] ."#comment" . $i . "'>" . $commrow['name'] . "</a> ";
-
Just apply the relevant CSS to the BODY rather than a div. BODY { BACKGROUND-COLOR: #FFFFFF; COLOR: #333333; FONT-FAMILY: trebuchet ms, verdana, arial, sans-serif; FONT-SIZE: 12px; FONT-WEIGHT: bold; TEXT-DECORATION: ; PADDING: ; width: 800px margin: 0 auto; }
-
session.gc_maxlifetime is to do with Garbage Collection which will only affect expired sessions.
-
Sessions last as long as the browser is kept open or until it exceeds the time limits set by session.cookie_lifetime setting.
-
blogtastic should be your database and categories should be your table. Make sure you have spelt the table name correctly in your query. You may have misspelt the table name when your created it, but didn't realise it at the time.
-
PHP page blank, HTTP 500 Internal Server error
wildteen88 replied to mcerveni's topic in Apache HTTP Server
No. Since PHP5.0.x was released. You must of modified the php.ini on your previous version in order for short tags to work. -
PHP page blank, HTTP 500 Internal Server error
wildteen88 replied to mcerveni's topic in Apache HTTP Server
Its the tags that is causing the problem not the code within the tags. There is no end keyword! So I don't know why you keep suggesting it. The following error: Parse error: syntax error, unexpected $end in C:\Apache\htdocs\watchclockshop\include\menu.inc.php on line 38 Is caused by mismatching braces { } or ( ) within the code. Because mcerveni has short_open_tag disabled in the php.ini PHP is unable to see the closing brace in the following code: <? } ?> Earlier you told mcerveni to change <? } ?> to <?php } end; ?> Which did fix the problem mcerveni was having. However it wasn't because you added end; after the closing brace. It's because you used the full PHP tags (<?php ?>). -
PHP page blank, HTTP 500 Internal Server error
wildteen88 replied to mcerveni's topic in Apache HTTP Server
What! Just because your disabled display_errors and now no errors are being display means everything is working. Did you read my post? -
PHP page blank, HTTP 500 Internal Server error
wildteen88 replied to mcerveni's topic in Apache HTTP Server
No! Its not because mcerveni left of the 'end' keyword - there is no such thing in PHP. It is because mcerveni's code uses short tags. mcerveni open your php.ini and enabled a setting called short_open_tag. By default PHP does not recognise tags such as <? ?> or <?= ?>. Undo what lupld told your to do. -
In config.php you are assigning the $dbdatabase variable your database name. However in header.php on this line: mysql_select_db($database, $db); You are using a variable called $database. Change $database to $dbdatabase in header.php
-
I have a question about session variables
wildteen88 replied to jim.davidson's topic in PHP Coding Help
PHP does not handle sessions differently from version to version. Could you post a snippet of your code where your use sessions. It maybe a PHP configuration issue. -
Apache 2.2.8 PHP 5.2.5 Installation...
wildteen88 replied to SlyCayer's topic in PHP Installation and Configuration
After using the zip package did you manage to get Apache and PHP working properly from my instructions? I do not recommend using the PHP installer. I find that the installer can cause more problems then needs be. Manual install is best. -
Best way would be to reset the password for your Administrator account. Just login to phpMyAdmin open phpBB's from the left hadn from. Then load the members or users table (I'm not sure what it is called) find your username and select the little pencil icon in the same row to edit the entry. Scroll down and find the Password field select the MD5 from the menu in the functions column then type your new password in the field next to it. Scroll down and select Go. Try loggin in with your new password. If it doesn't work just reinstall php by running the install script again.
-
PHP page blank, HTTP 500 Internal Server error
wildteen88 replied to mcerveni's topic in Apache HTTP Server
To test is your server is properly configured. Create a new file called phptest.php with the following code in the htdocs folder: <?php phpinfo(); ?> And run http://localhost/phptest.php if outputs PHP current configuration then Apaches configuration is ok. Now to see if subfolders work create a subfolder in the htdocs folder and call this new folder subfoldertest and move phptest.php to it. Now run http://localhost/subfoldertest/phptest.php if you get the same output then Apaches configuration is fine. In which case from the problems you are having it sounds like its to do with how your site is coded. However please read my post here regarding the php.ini -
Because your are using raw _POST data in your query you are most probably typed a quote in your form which is causing the error. You should not place raw _POST data directly into a query as is very unsecure. I'd change your code to: <?php if(!empty($_POST['first1'])) { $first1 = mysql_real_escape_string($_POST['first1']); $id2 = mysql_real_escape_string($_POST['id2']); $branch2 = mysql_real_escape_string($_POST['branch2']); $update1 = "UPDATE student1 SET first = '$first1' WHERE id='$id2' AND branch='$branch2'"; $result1 = mysql_query($update1) or die(mysql_error()); echo "First name updated" ; $count++; } ?>
-
use the font-size property, eg: div { font-size: 12px; } The above CSS will set any text with a DIV to 12px. If you to set the size to a specific DIV, give it a class eg: <div>Normal sized text</div> <div class="biggerText">Much Larger text</div>" Set the following CSS: .biggerText { font-size: 24px; } You can learn the basic of CSS over W3Schools.com. They also support code demo's which you can test live.