Jump to content

wildteen88

Staff Alumni
  • Posts

    10,480
  • Joined

  • Last visited

    Never

Everything posted by wildteen88

  1. There is no setting which limits the number of $_POST vars that can be set. However there is a memory limit for POST data which is 8MB by default. Howver why do yoiuneed to to set 200 or even 1000 $_POST vars! Surrely you're not going to have that big of a form?
  2. Yep that code is fine.
  3. Oops. Remove the highlighted character on line 7 That should sort the error.
  4. its to close the if statements in the first code block. If you notice I closed the first code block before the <h1> tag. As I closed the first code block I didnt close the if statments. Thats why at the end of the page I had to open another PHP code block to close the if statements.
  5. You'll first have to provide a link to the article. To do this First change your query so it also returns the article id. Now you'll want to provide a link for the user to click on to view the article. Now in article.php the basic code will be <?php if(isset($_GET['id'])) && is_numeric($_GET['id'])) { $id = (int) $_GET['id']; $sql = 'SELECT title, poster, text, time, date FROM `news` WHERE id='.$id; $result = mysql_query($sql); if(mysql_num_rows($result) == 1) { $row = mysql_fetch_assoc($result); ?> <h1><?php echo $row['title']; ?></h1> <p>Posted by: <?php echo $row['poster']; ?> On <?php echp $row['date'] . ' ' . $row['time']; ?> <p><?php echo $row['text'];</p?> <?php } } ?>
  6. Yet the field still blank? You sure nothing else in your code is updating the field?
  7. Have a look at this code FAQ to display results in mulitple columns.
  8. Is there a field with the id of 1 in your settings table? What is the output of echo mysql_info(); When you place that after mysql_query()
  9. This is invalid syntax <a href="download.php?id=<?php=$id;?>"><?php=$name;?></a> <br> There is no <?php= tag (Only <?= when short tags is enabled). You should be using <?php echo $var; ?>
  10. Seeing as your id field is set to int there is no need to wrap the id in your query within quotes. $sql5="UPDATE settings SET ad1='$ad1' WHERE id=1"; if it still does work I dont know what else to suggest.
  11. Not understanding what you said here Also please wrap your code in tags rather than quote tags
  12. What data type is your ad1 field set to? Post your table schema here.
  13. Where is the variable $ad1 definded? And when you echo $sql5; does your query look right?
  14. By line 2 are you refering to this line? RewriteRule ^dir/([0-9]+)/?$ /index.php?file=$1 [L] If thats case then your url mysite.com/<filename> wll not work as it is expecting a url like [m]mysite.com/dir/<some number here>[/b]
  15. When ever I install Apache, PHP (and MySQL) I always install them to a C:/Server. To change the install location you will need to choose Custom setup rather than Typical setup when installing Apache and MySQL. PHP can be just extracted to C:/Server/PHP Creating symbolic links seems OTT to me.
  16. From that you do not need to be using a switch at all. You need to provide a more thorough explaination of what you're. such as what is in your database? What are you wanting to do with the results etc?
  17. Using the round function
  18. If the file contains just plain HTML it should render the page. How are you loading your html file in your web browser?
  19. When using print_r use it like so echo '<pre>'.print_r($matches, true).'</pre>'; This will make the structure of your array more clear. Can you also explain what are trying to do with your code?
  20. You will be better of getting support over at the offical SMF support forum over at http://simplemachines.org
  21. Because it is indented. The closing HEREDOC indentifier (HTML;) must on its own line with nothing before or after it.
  22. Yes that will be fine. To prevent users from looking in your libs/ folder you can place a .htaccess files in that folder and place the following code in it Options -Indexes This will produce a 403 forbidden error when a user tries to go yoursite.com/libs/.
  23. As you are not providing a destination for where the files get extracted to. PHP is trying to extract file in the root of the file system ( this is what / means at the beginning fo file paths). It is not possible to create files in the root of the file system with PHP. In order to prevent this change this function extractTo($archive, $destination, $ecrase = FALSE, $fichiers = NULL) { To function extractTo($archive, $destination, $ecrase = FALSE, $fichiers = NULL) { $destination = $_SERVER['DOCUMENT_ROOT'] .'/'. $destination;[code=php:0] Now if no destination is provided your script will extract the files to your sites document root
  24. PHPIniDir can placed any where in Apaches httpd.conf file. When running phpinfo and checking to see if PHP is reading a php.ini file you should look at the line labeled as Loaded Configuration File. Ignore the line above labeled as Configuration File (php.ini) Path
  25. If you used the installer it should ask what server you are using. You should of choosen Apache2.2.x from the list of servers. The installer will then apply the required changes for you. Once PHP is installed restart Apache.
×
×
  • 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.