Jump to content

Jessica

Staff Alumni
  • Posts

    8,968
  • Joined

  • Last visited

  • Days Won

    41

Everything posted by Jessica

  1. As it says, it can't connect to the DB. Where is your connection code?
  2. Why do you unset the usersnamd and password before using them? Also, you don't need quotes around your variables in the connect function and others like that. Secondly, "Doesn't Work" is too vague. Where is $student defined?
  3. IIRC, using the word global that way means you defined the variable outside of the function, and want to use it IN the function. I think you need to have the function return it, or maybe use the $_GLOBALS array to set it this way?
  4. Also make sure you read up on security, SQL Injection, etc. There are two approaches to storing entries, either as files or in the DB. I like DB because it's easier to write a search, but flat files should be faster.
  5. http://www.phpfreaks.com/forums/index.php/topic,172924.0.html
  6. Maybe they have their own custom templating engine. If you're using a third party program, ask on their support forum, or read the docs.
  7. thorpe, don't you mean this? foreach($_SESSION as $k=>$v) {
  8. That's a smarty template {$sitelink}.
  9. Maybe you should take some actual classes, to help you learn more about programming in general? Good luck!
  10. I tried that and then whenever you tried to go to the site it asked you to download the file. I have used a host who runs both before :/
  11. I created and uploaded the folder and files via FTP, but then I reuploaded them into the root folder. It's working now. The host claims they turned it off, but it still gives the error if I try to require a file in a lower folder. They also promised they upgraded to 5 and the phpinfo() is 4.4 so they're ****
  12. The permissions or the owner? I can only check the permissions via FTP, I don't have any other access.
  13. Yes. It worked when I moved them to the root dir.
  14. okay - there are a lot of things you can fix here but here is short example <?php if(isset($_POST['sort_2'])){ if ($_POST['sort_2'] == "2"){ $gender = 'M'; }else if($_POST['sort_2'] == 3){ $gender = 'F'; } }else{ $gender = $_SESSION['gender']; } $query .= " WHERE Sex='$gender'"; $_SESSION['gender'] = $gender; ?> The less often you have to type the same thing over and over the better Also, why do you put your semi-colons waaay out there? That is different...
  15. I bought the design from a stock site, and then edited it. I usually do that too but since those have always been the main areas of my site over the years, I figure I'm not going to change them anytime soon.
  16. They're really small images, and if I used a font they wouldn't match the title. But thanks
  17. Google can - there are tons out there. (edit: the one I posted was not what you want, sorry. But google it and use the mail() function)
  18. It will help if you name your form elements better than "sort 3" Before you check if the sort_2 is posted or in the session, check only if it is posted. That means it's changed, and if it was 1 and is now 2, you want to ignore the session variable, that is why you get M and F - if it WAS 2, and is NOW 3, both if statements are true.
  19. There's a board for regular expresions: ) But if all you need is everything after ?url you can use strpos and substr.
×
×
  • 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.