Jump to content

White_Lily

Members
  • Posts

    531
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by White_Lily

  1. To clear the sessions when they are no longer needed just use; unset($session variables);
  2. I didnt write the code for any of this, I'm merely adding to it/fixing errors. The way it was written wasn't really my choice unfortunately. You have confused me with the whole labels thing... sorry
  3. I am only posting what I have been told from others. and yes i read what you wrote.
  4. Im only passing on what I been told by others no need to have a go at me.
  5. I'm just saying what I have been told. So far I have you telling me I am supposed to be using E_ALL and a Mod telling me to use -1
  6. The -1 will show all possible error, whereas E_ALL will suppress E_DEPRECATED and few others. Using -1 lets a developer correct as much as possible, and helps make sure the code isn't going to suddenly stop working when the server is upgraded to the next version of php. So actually it is more useful to use -1.
  7. If he uses the php.ini it means he can sort out as many errors in his whole site as he possibly can rather having to insert code at the top of each page to find the errors. Therefore its actually easier just to restart the web server since it only takes 20 seconds
  8. As i found out the other day its better to use "-1" not E_ALL and if he uses php.ini it will show errors across his entire site, not just one page.
  9. Whats with all the inserts? O.o Have you also tried using a php.ini file? If not - create one and type into it: display_errors = on error_reporting = -1 Save that file as "php.ini" and run your web page again. (NOTE: you may need to re-start your web server)
  10. Maybe see if you spelt the connection settings correctly?
  11. Sessions are better since they can be carried across the entire website, where as post can only be carried to the next page.
  12. You link a database to php through a php connection script. Ex: <?php //Define connection settings $host = "localhost"; $user = "root"; $pass = ""; $database = "database name"; //Connect $con = mysql_connect($host, $user, $pass) or die("Could not connect."); //Select the database your website gets its content from $db = mysql_select_db($database) or die("Could not select database."); ?>
  13. <label>Page:</label> <select name="catSel" style="width: 300px;"> <? $getCategories = select("pages", "id, name", "(page_switch = 1) AND (type = 2 OR type = 4 OR type = 5)"); // this line is the fix while ($categories = mysql_fetch_array($getCategories)) { echo "<option value='".$categories['id']."'>".$categories['name']."</option>"; } ?> </select>
  14. <td><a href="-filename-"><?php ehco $record["url_t"]; ?></a></td>
  15. I will post the solution tomorrow when I am back at work. Sorry.
  16. @beyzad - re-read his problem. he WANTS each image to have a unique name.
  17. No it didnt work, and error reporting isnt showing any errors either. php,ini id set to: display_errors = on error_reporting = -1
  18. Got a point there lol guess i didn't see it like that - will try the ||
  19. Hi, I have a page that allows you to select pages that you want have related pages on. The problem I'm having is that its not displaying anything, not even the types of pages that I want it to display and have specified. <?php $getCategories = select("pages", "id, name", "page_switch = 1"); while ($categories = mysql_fetch_array($getCategories)) { //if(!isset($usedCats[$categories['id']])){ if($categories["type"] == 2 && $categories["type"] == 4 && $categories["type"] == 5){ echo "<option value='".$categories['id']."'>".$categories['name']."</option>"; } //} } ?> I can't seem to figure out why it's not displaying anything Any help would be appreciated.
  20. Also, make an id column for each table you mentioned so that you can match the story with the user.
  21. You say it just redirects you to login page with no errors... Try commenting out all header() lines, and put error messages in their place instead. Then post back here and tell us what the error is. //error message echo "Error: ".mysql_error();
  22. your php.ini file should be this: display_errors = On error_reporting = E_ALL
  23. Its just a completely blank page? Check your php.ini settings if this is the case.
×
×
  • 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.