Jump to content

wildteen88

Staff Alumni
  • Posts

    10,480
  • Joined

  • Last visited

    Never

Everything posted by wildteen88

  1. MySQL supports Wildcards within queries,
  2. 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)
  3. 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.
  4. You'd use $this->classAFunction
  5. 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).
  6. 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;
  7. 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.
  8. 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.
  9. 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> ";
  10. 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; }
  11. session.gc_maxlifetime is to do with Garbage Collection which will only affect expired sessions.
  12. Sessions last as long as the browser is kept open or until it exceeds the time limits set by session.cookie_lifetime setting.
  13. 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.
  14. 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.
  15. 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 ?>).
  16. What! Just because your disabled display_errors and now no errors are being display means everything is working. Did you read my post?
  17. 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.
  18. 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
  19. 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.
  20. Because you havn't set the submit method for your form your browser is always going to send submitted form data over the url using the GET method. You should set the submit method to POST instead. <form action="<?php $_SERVER['PHP_SELF'] ?>" method="post">
  21. 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.
  22. 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.
  23. 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
  24. 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++; } ?>
  25. 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.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.