Jump to content

wildteen88

Staff Alumni
  • Posts

    10,480
  • Joined

  • Last visited

    Never

Everything posted by wildteen88

  1. I guessing by table you mean an SQL Table? if you do you will need to look in to the ALTER TABLE query.
  2. Your not making much sense. But are you tying to add a string which containts "one","two", "three", etc....... in to a text file with no html formatting?
  3. You are not using the correct path for the include. The following include path: /included/included_pages/header.php you have specified is telling PHP to go to the root file system (/) in a folder called included_pages and to include a file called header.php. Now obviously the root of file system will be strictly off limits to you. What you will want to do is add a period before the / in your inlude path. So try this: include('./included/included_pages/header.php'); That now tells PHP to go from the current working directory. If the folder called included is in a different folder higher up the directory tree then use ../ to go up one higher in the directory tree instead.
  4. Your are not checking that _POST['name'] variable exists. SO if it doesn't exist you code is going insert NULL values for name column in MySQL. You should check that it exists first. Like so <?php $username="wwwjust_chris"; $password="123456"; $database="wwwjust_games"; mysql_connect(localhost,$username,$password); @mysql_select_db($database) or die( "Unable to select database"); if(isset($_POST['name']) && !empty($_POST['name'])) { $name = mysql_real_escape_string($_POST['name']); $query = "INSERT INTO games VALUES ('','$name')"; $result = mysql_query($query); mysql_close(); } else { echo "Please ensure you have filled in the name form field!"; } ?>
  5. This what you mean?: <?php $numbers = array("one", "two", "three", "..."); echo implode(", ", $numbers); // output: one, two, three, ... ?> Need more information on what you are trying to do. Post your code here too.
  6. If you want to add the word and its length then you do this: $long['len'] = 5; $long['word'] = 'myword';
  7. Your common.php file is missing from the root of the phpBB folder. Check that you have extracted all files from the archive file. Keep in mind phpBB3 is still beta stages. It is not fully supported. You should use the latest stable release which phpBB2.x
  8. Huh! I am confused what forum software are you trying to use SMF or phpBB? And what theme are you trying to use on what forum?. You are not making much sense. Please can you add more detail to your what you are trying to do
  9. Your html is not valid. So how can you expect the browser to comply with what you want your page to look like. Any HTML document should at least have the basic set of tags which is this: <!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> <title>Your site/page title</title> <!-- link any external pages here, eg stylesheets or javascript files. --> </head> <body> <!-- all html code for the page here --> </body> </html> Yours only has the first two lines! Also you close your tags in the incorrect order which will make your code invalid. This: <div class="gbname"><a href="http://www.scrappa.com" target="_blank">Scrappa.com</div></a> is supposed to be this: <div class="gbname"><a href="http://www.scrappa.com" target="_blank">Scrappa.com</a></div> If you make your code valid then the browser will abide by what you tell it. Otherwise it will go into quirks mode. Another thing is try to format your html code too.
  10. I see you are using the old $HTTP_GET_VARS. PHP5 introduced a setting called register_long_arrays and is disabled by default. in the php.ini This was brought in because the old superglobals $HTTP_*_VARS was made depreciated when the newer superglobals was introduced to replace them. What you should do is either enable the register_long_arrays in a .htaccess file/server configuration. Or the other option is to change your code to use $_GET rather than $HTTP_GET_VARS (recommended). If you change your code it should still work with PHP4.
  11. Also </input> has never existed. insert tags (and a few other tags, such as br, hr etc) do not have a matching closing tag. If you are using XHTML then you do as AndyB suggested. However if you are using HTML then you don't need to have the (space)/ before closing the tag.
  12. Does you browser allow cookies from localhost. Also could you post your code too. You must call session_start() first in order for the session to be initiated. Make sure session_start() is called before any output to the browser. It is recommended to place session_start() on the first line of your script.
  13. A better way would be to display the errors on the same page as the form. Rather than showing the error then making the user click the browsers back button/link to go back to correct the errors
  14. If you want to install AMP (Apache, MySQL and PHP) download a package call WAMP. WAMP will install AMP for you. However I do highly recommend to install AMP manually yourself. I have written loads of posts on how to setup AMP on Windows in the PHP Installation forum and the Apache form.
  15. Try this: define("images_path", $_SERVER['DOCUMENT_ROOT'] . "/gallery/images");
  16. Are you converting the newlines when you create the file? Could you post your code here.
  17. by validate are you checking to see if newline characters are in the data in the textarea and not convert the newlines to html linebreaks in the textarea? if that is the case then add '\s' (minus the quotes) to your eregi expressions. Note \s matches all whitespace characters \r, \n, spaces, tabs
  18. You use the same username/password combination you used in order to login to MySQL and to create your tables. By default MySQL creates a user called root with no password set when MySQL is installed.
  19. That code only fetches one record as that is how you have coded it. You should use a while loop in order to get all the records from result of the sql query.
  20. Your server is misconfigured then. Nothing to do with MySQL. What OS are you using and what server are you using?
  21. If you want to send an email with php use mail. YOu will have to get feedback.html form to submit to a PHP script which process the data passed in feed back form to be sent in the email. You can not send emails with HTML. However you can initiate the clients mail program to compose an email with your sites email address preloaded into the Send To: box. Look into the mailto: protocol
  22. Do this: ${'var_' . $key} = $value; So what that will do is create a variable called var_ followed by the value $key. So if key was set to 'foobar' it would create a variable called $var_foobar
  23. Change <script language="javascript"><!-- document.write('<?php echo '<a href="javascript:popupWindow('' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) . '')">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>'); //--></script> <noscript> <?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?> </noscript> to this: <script language="javascript"><!-- document.write(<?php echo '\'<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>\''; ?>); //--></script> <noscript> <?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?> </noscript>
  24. Yes once Apache is installed, delete the files already in the htdocs folder no need for them now. Once you have done that go to http://localhost and you should now get a list of files/folders that is the document root (htdocs folder). Is you test.php file listed. Also could you tell me the process you did to create the test.php file? If you used Notepad to create it make sure when you went to save it you did not save it as test.php.txt. Notepad will by default add a .txt file extension when you save. What you should do before you click the save button is to make sure the File Type box is set to All Files and not Text Document.
  25. Give your emoticon images an inline style of border: none; EG: <img src="./emoticons/smilie.gif" style="border: none;" alt="" />
×
×
  • 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.