Jump to content

wildteen88

Staff Alumni
  • Posts

    10,480
  • Joined

  • Last visited

    Never

Everything posted by wildteen88

  1. What is line 432 in the code you posted?
  2. You need to post the code you're having issue with here. Also explain what in your code is not working correctly
  3. You just need to wrap your variables in HTML tags, eg echo "<h1>$title</h1>"; echo "<p>Posted on $date by <b>$author</b></p>"; echo "<p>$message</p>"; That some basic styling. To apply more you'd use CSS.
  4. Its your cache. Go to http://localhost let it load and then do Ctrl + F5
  5. The index file is in the htdocs folder (same as test.php). Removing the index file should show a directory listing
  6. Try Ctrl + F5 when going to http://localhost. Your browser has cached the old index page
  7. I know test.php in the htdocs folder. What I want to know is what is shown when you go to http://localhost (i dont want you to run test.php)
  8. Define what you mean by "it doesnt work". What is you function supposed to do? What are you trying to do?
  9. Just go to http://localhost not http://localhost/test.php You should get directory listing. Which shows all files in the htdocs folder. Is test.php listed?
  10. The snippet you provided is fine (on its own). We'll need to see more code.
  11. You are overwritting your $_POST data when you submit your other two forms. What you'll have to do is pass the old $_POST data in either a hidden field in your other forms or via $_SESSION vars
  12. No not all. As I mentioned earlier everything in square brackets is optional, ie not required. If the format for calling the function was this ( , , [ ] ) Then it'll make function calls ugly and confusing. in_array($needle, $haystack,)
  13. Post your code here that you're having problems with.
  14. parameters wrapped in square brackets are optional. In your case all you'll need to do is $oscfile = file_get_contents("http://cc.cc.cc.cc:81/osc/osc/osc/catalog/product_info.php?products_id"); Personally I find the manual easy to read. One of the best around. However if you're struggling to read the manual have a read of this.
  15. No. The select field will only return the option(s) selected by the user. Why do you need to retrieve all options?
  16. In your php.ini you need to make sure display_errors is set to On and that error_reporting is set to E_ALL. Save the php.ini and restart Apache. NOTE Make sure you're editing the correct php.ini. To confirm, run phpinfo and look at the Loaded Configuration File. This will tell you the full path to the php.ini PHP is reading. Make sure you're not editing lines that start with a semi-colon (
  17. Remove all files in C:\Program Files\Apache Group\Apache2\htdocs leaving just test.php Go to http://localhost. What is listed?
  18. You can use CSS to apply a different style when printing. Here is an example
  19. You can download Apache2.2 from here instead: http://apache.mirror.rbftpnetworks.com/httpd/binaries/win32/ Download the package titled apache_2.2.11-win32-x86-no_ssl.msi Seems the link is broken on the Apache download page.
  20. You cannot have any ouput form of before using header. To fix this change this <?php include('connection.php'); ?> <head> <title>checklogin</title> <link href="style.css" rel="stylesheet" type="text/css" /> <link rel="icon" type="image/png" href="favicon.ico"> </head><?php // Connect to server and select databse. To this <?php include('connection.php'); // Connect to server and select databse. Now change <body> <!-- header start --> to <head> <title>checklogin</title> <link href="style.css" rel="stylesheet" type="text/css" /> <link rel="icon" type="image/png" href="favicon.ico"> </head> <body> <!-- header start -->
  21. Remove the . after '$g_name'. Also these lines $your_team = mysql_real_escape_string($_POST['your_team']); $opp_team = mysql_real_escape_string($_POST['opp_team']); $time1 = mysql_real_escape_string($_POST['time1']); $date1 = mysql_real_escape_string($_POST['date1']); $g_name = mysql_real_escape_string($_POST['date1']); $result = mysql_real_escape_string($_POST['result']); $writeup = mysql_real_escape_string($_POST['writeup']); Should be after you connect to mysql. mysql_real_escape_string will only work if you're connected to mysql first.
  22. Have a look at this FAQ Snippet.
  23. By sanitize I meant pass your variables to mysql_real_escape_string before placing them in your queries.
  24. Values needs to wrapped in quotes in your queries. You should sanitise user input before placing it directly into to your queries. It is not recommend to place raw $_POST, $_GET data etc into queries.
  25. mysql_query only expects two parameters. The first will be the query. The secound parameter which is optional is the mysql link resource, which in your case is $con. You cannot pass two queries at the same time to mysql_query, only one at a time. This mysql_query($sql,$sql1,$con); should be written as mysql_query($sql,$con); mysql_query($sql1,$con);
×
×
  • 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.