Jump to content

Maq

Administrators
  • Posts

    9,363
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by Maq

  1. User interaction is the most definite to checking whether an email exists and is valid. But some other things you could do... 1) Use regex to check if it's a valid format. 2) Read this article. I haven't tried it but it looks like it contains code to see if the user has a valid email address.
  2. 1) Why not store it as a string? 2) If you store it without the periods, how are you going to know where they go? 3) If you are going to use a BigInt, why don't you parse it for one first? (take out the periods)
  3. You mean once you changed the parameter to 2 instead of 4. I also think btherl is right in that it looks like you should be returning 0 or 1 in the if else statement in your function because you're echoing echo $ok?1:0; When you could really just echo the function itself instead of using ternary operator. In any case please mark as solved.
  4. You should use Javascript. Have a look at these examples.
  5. PHP is interpreted not compiled unless you're using something like Zend but ultimately it is still interpreted. Compilers do not run through scripts, this doesn't really make any sense to me. What exactly is this script?
  6. Basically you have your "main" page that calls your other pages depending on what the user clicked on. So you have main.php And like ProjectFear already suggested, you have 3 other pages: contactus.php jointus.php news.php So you would grab the page by doing: $page = (isset($_GET['page'])) ? $_GET['page'] . "php" : "main.php"; Then proceed with the ifelse statements...
  7. Humorous. Just man up and tell him to stop coming around. If you feel bad and still want to talk to him, just tell him to stop by later in the day or call. Like CV said: Unless you have more furniture...
  8. Please don't double post. Add and tell me what it says. $db->misc($query) or die(mysql_error());
  9. I can see how that works. But you said Audio is the only choice anyway so why even include it, even if it's hidden?
  10. Absolute paths will work but, are not the best choice. I always find creating a relative root path is the best way. If you switch servers or are pushing something to a production server you could have the wrong path.
  11. For 0-9 there may be a SQL statement I'm not aware of but you can do it quite easily in PHP. for($x=0; $x{ $sql = "SELECT * FROM systems WHERE name LIKE '$x%'"; }
  12. Awesome, you never know when you could use some icons... *bookmark*
  13. What are you asking from us? Do you want someone to do it for you or do you have a problem with your current script?
  14. Yes, sessions will work too, probably a better idea. Also make sure you clean your strings with mysql_real_escape_string().
  15. It's because you have to submit twice before you actually get to the INSERT part. So you're losing name. If you look in your database I bet it's not even INSERTING the name or email... You need to store the name in a hidden field for step 2. $name = $_GET['name']; "'>
  16. Yeah, I found this awesome site the other day, click here.
  17. Google? Let me get you started... WINE
  18. I agree. I always wonder where people learn to speak and spell so poorly. Maybe it's the lack of learning...
  19. 26 queries sucks, but its the easiest way. It's not 26, it's only 1... You have 5 links: 1. 0-9 to be a link to another page = "search.php?char=09" 2. A to be a link to another page = "search.php?char=a" 3. C to be a link to another page = "search.php?char=c" 4. O to be a link to another page = "search.php?char=o" 5. Z to be a link to another page = "search.php?char=z" $char = $_GET['char']; SELECT * FROM stuff WHERE name LIKE '$char%'; You're going to have to think of something to take care of 0-9.
  20. What part do you need help with? To get the data from the DB do something like this: $char = "a"; SELECT * FROM stuff WHERE name LIKE '$char%';
  21. Shouldn't they be? ../jobs/autocad.php ../about.php
  22. I see. I solve most of my problems with echos...
  23. Where does $player come from, I don't see it declared anywhere...?
  24. That's because you need to add the or die(mysql_error()); to see it.
  25. username='".$Username."'"; Where do you get $Username from? and why are you storing queries in sessions...? Also, look at your link (assuming they are id's): echo ' So if $row['item'] is 65 then it would be: www.yoursite.com/sell.php?item=65 In your script you should check to see if item isset and if it is delete it: if(isset($_GET['item'])) { $item = $_GET['item']; $sql = "DELETE FROM table WHERE item = '$item'"; echo $sql; mysql_query($sql) or die(mysql_error()); }
×
×
  • 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.