Jump to content

wildteen88

Staff Alumni
  • Posts

    10,480
  • Joined

  • Last visited

    Never

Everything posted by wildteen88

  1. You cannot use gmail as an SMTP Server as mail() does not support authentication. GMail requires authentication in order for email to be sent from their servers. mail works fine. It's just you got to use a non-secured SMTP server in order for mail to work.
  2. If you have PHP version 5 or greater you must enable the MySQL extension within the php.ini. Please read this FAQ. Also I would recommend you to turn a setting called display_errors on within the php.ini too. That way if there is any errors PHP will display them to the screen rather than an unhelpful blank screen.
  3. I can give you my config files but it still wont work as I have setup Apache and PHP in completely a different way to you. There is no standard configuration. How have you "broken it"? What was you doing before you got the Forbidden Error message.
  4. Not understanding your question. Is the HTML code displayed back to the screen as normal text, eg instead of bold text you get <b>bold text</b>.
  5. You need to make sure Apache is running before you can go to http://localhost/ Also you don't install/place PHP in the htdocs folder. Apache won't auto recognise PHP. Apache has to be configured in order to know what PHP is. Windows won't know what .php files are as they have not been assigned to a program
  6. If PHP was installed before Apache was installed then you are going to have re-run the Installer. Having a look at the documentation you can re run the installer in Add/Remove Programs (Located in Start > Control Panel). NOTE: Make sure Apache is started before using the installer.
  7. Note sure but the style of quotes you use is not correct. You should use " and not “ <html> <head> <title>PHP Test</title> </head> <body> <p>This is an HTML line <?php echo "<p>This is a PHP line</p>"; phpinfo(); ?> </body> </html> Make sure you are using a bob standard text editor, such as Notepad and not using MS Word/Wordpad when you are creating your PHP scripts.
  8. I guess you are using the Design View. By default when you press the Enter button DW adds in Paragraph tags. If you want to add a line break I think you Press Ctrl+Enter or Shift+Enter can't remember which key combination it was. If you want to enter Line breaks by default I think you can change that behaviour by going to Edit > Preferences
  9. For windows you place the php files in C:/Program Files/Apache Foundation/Apache2/htdocs (note the actual path maybe different). Note: If you have installed PHP (using the installer) after you have installed Apache you will need to restart Apache as PHP changes Apache's configuration file. When you change Apache's configuration file Apache must be restarted.
  10. Check that your html output is correct, right click view source. Nothing to do with PHP. Web browser don't even know what PHP is and PHP doesn't know what a web browser is. It is most probably an HTML error. Add HTML comments into your HTML when a specific function occurs within your PHP code, eg: echo '<!-- INCLUDE footer START -->'; include("templates/datafooter.htm"); echo '<!-- INCLUDE footer END -->'; That way you can see which part of your PHP script has generated which segment of HTML.
  11. Could you post your php.ini here. NOTE please attach the php.ini dont copy and paste the contents. Also remove any username/passwords you have added to the php.ini
  12. #nav a should work. Could you post some HTML example code for the left nav
  13. If you want the pull dowm menu to return the user id you will have to name the drop downbox using the name html attribute inside the select tag, eg: <select name="user_id"> . Then you want to store each seperate users users id in the value attribute for the option tag. eg: <option value="[user_id_here]">[user_name_here]</option> So putting it all together you get this: <form name="profileview" method="post" action="profile2.php"> <?php echo <<<EOF <table border="0" cellpadding="0" cellspacing="0"> <tr> <td>View:</td> <td> <select name="user_id"> <option>Select User:</option> EOF; $sql = mysql_query("SELECT * FROM users WHERE user_id != '$user_id' ORDER BY username"); if (mysql_num_rows($sql) > 0) { while ($row = mysql_fetch_assoc($sql)) { echo '<option value="' . $row['user_id'] . '">' . $x['username'] . "</option>\n "; } } echo <<<EOF </select> </td> </tr> <tr> <td> <input name="action" type="hidden" id="action" value="View"> <input type="submit" name="submit" value="View" /> </td> </tr> </table> </form> EOF; ?> In profile2.php you use $_POST['user_id'] to retrieve the users id that was selected in the drop down list.
  14. You will want to use Rewrite Conditions: RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)\.html$ index.php?Level1=$1 [L] ModRewrite will now check to see if there is an existing file first before running the rewriteRule
  15. Cant you just add a hidden form field which holds the value of $x[user_id]? Also I cannot understand your code. When you submit the form only the submit button and the hidden form field values will be returned but not the value from the drop down menu.
  16. No one can view the true PHP source code of .php files from a web browser so no need to worry. The only time when someone can see the true source code of your php script is either the server is not setup properly or someone manages to get hold of your FTP username/password. No source code is ever returned - only the output (html/text). If php source code was always returned every site that was coded in php would be so easy to hack.
  17. Is that your current configuration? If it is then you have no configuration setup within the httpd.conf for setting up PHP with Apache. You will need to add the following to the httpd.conf in order setup PHP with Apache LoadModule php5_module "C:/php5/php5apache2_2.dll" AddType application/x-httpd-php .php Change C:/php5 to the full path where PHP is installed to. Save the httpd.conf and restart Apache. PHP files should now be working. I can't see how PHP was working fine until now as there is no configuration in the httpd.conf. Have you upgraded Apache recently?
  18. phpBB2.0.x does not support child boards. You will have to wait until phpBB3.0.x comes out which does support child boards. There may be a mod available for phpBB2.0.x to add child boards have a search of phpBB's website for that. Here is on such mod you can install add child boards
  19. Goto mysql.com maybe? Click on Community from the menu and then Downloads from the left sidebar followed by clicking on Older Versions links on the Download page.
  20. A simple bit of regex: <?php $username = 'c00l_Dude'; // valid //$username = 'cooldude832'; // valid //$username = 'c00l'; // Invalid //$username = 'Cool-Dude'; // Invalid if(preg_match('/^([A-Z0-9_]){5,}$/i', $username)) { echo $username . ' - Valid'; } else { echo $username . ' - Invalid'; } ?>
  21. Change $temp to a different variable for your while, eg: function __construct(){ global $sql; $temp = $sql->_query(" SELECT * FROM sb_config ORDER BY `sb_config`.`key` "); while($row = $sql->_fetch_assoc($temp)){ $this->data[] = $row; } define('URL', $this->data['domain'].$this->data['path']); } When you use $temp = $sql->_fetch_assoc($temp). You are overwriting the temp variable which then losses the result resource for the query and thus you are getting the error you getting.
  22. What forum software are you using on your site? You will best of reading the user manual for your forum software for adding child boards. Normally you can set-up child boards on the same page you set up your boards forum categories/boards.
  23. The variable $x[user_id] is being created in the while loop. You can only use variables after they have been defined you cannot use them before they are defined. PHP does not backtrack. What are you trying to do.
  24. I'm not getting any error when I go to the supplied link. I dont even get any error message at all when I browse around the site either
  25. Oops typo! I meat: Also mysql_select_db does not return any value so no need to setup a variable ($which) to hold the returned value. Which means change this line $which = mysql_select_db(veraci7y_website) to this: mysql_select_db('veraci7y_website')
×
×
  • 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.