Jump to content

Maq

Administrators
  • Posts

    9,363
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by Maq

  1. Yes definitely, PHP would be a very good choice. Do you have anything set up? A basic tutorial on PHP/MySQL: [urlhttp://www.tizag.com/mysqlTutorial/]PHP/MySQL[/url].
  2. Actually double or single it doesn't matter when using a dot to concatenate to the string. If you're putting the variable straight in the string (not breaking out of it) then you must use double quotes or the variables will not interpolate. As far as your linebreaks if your email is HTML you might have to use instead of \n. Anyway, this should include the number of guests and the email in your message. Good luck. $to = "email@email.net"; $headers = "From: " . $_POST['email'] . "\r\n" . "Reply-To: " .$_POST['email'] . "\r\n" . "X-Mailer: PHP/" . phpversion(); $subject = "Addition to Wedding Guest List"; $message = htmlspecialchars($_POST['name'] . "\n email" . $_POST['email'] . "\n guests" . $_POST['guests']); if(mail($to, $subject, $message, $headers)) {
  3. Do you have your mail setup properly? Read more here. Again, we need to see your mailform.php.
  4. Put this code to loop until 100 and see what it outputs...
  5. There's probably an easier way but with regex you can filter out whatever you need. Hope this helps: $s = "$200,000.00"; echo preg_replace("/[$ ,]|\.[0-9]{2}/", "", $s);
  6. Maq

    Select?!

    First off, are you sure you should be comparing account_id and username? Do you have a userid in the SESSIONs array that you should be using instead? That would echo out the resource ID, not the query. If you want to echo out the query you need to put it into a string first. $sql = "SELECT * FROM players WHERE account_id = '{$_SESSION['username']}'"; echo "Your query: " . $sql; $result = mysql_query($sql) or die(mysql_error()); $num = mysql_num_rows($result);
  7. Why are you taking out the .00? Are you rounding the amount to the nearest dollar?
  8. Sure, haven't particularly used them but I have seen some. What's the issue you're having? Perhaps some intuitive advice, use a framework.
  9. I disagree. They're not exactly "cute" but they aren't scary either. Ok, maybe not scary, but a bit creepy. Like the meatball in aqua teen hunger force.
  10. Hmm looks centered to me both on a 20" and 17". I'm not even sure what exactly you mean, maybe a screen shot? Those ball creatures are scary...
  11. Nope, not on the list.
  12. You need to format it using the date() function.
  13. This will output a descriptive error. mysql_query("INSERT INTO accounts (username,password) values ('love','love')") or die(mysql_error());
  14. No ';' mysql_query("INSERT INTO accounts (username,password) values ('love','love')");
  15. Have any idea how I'd get it to get the value? Start with your form. You pass it to process.php (which I haven't seen) check in there, keep following it around and echoing it out until you see where it either gets mixed up with another variable or somehow gets converted into a timestamp.
  16. Your error refers to line 28, but you only have 26 lines of code...
  17. That's a lot of information, what are you specifically having trouble with?
  18. Update that record with the new string and appended to it.
  19. You need to keep backtracking to where it gets passed to and find out where its losing its value.
  20. Put that line in, it will kill the script and let you view the value of $sublocation. else{ die("location:" . $sublocation); if($database->addNewUser($subuser, md5($subpass), $subemail), $sublocation){
  21. It's meant to remove the last element, not to add anything. But I don't know the reasoning behind it either... br3nn4n, The second param of explode is the LIMIT of how many elements, NOT characters. Your code works for me, can we see your current version?
  22. Something like this: if(isset($searchmodel)) { $query="SELECT * FROM cars WHERE make LIKE '$searchmake' AND model LIKE '$searchmodel'"; } else { $query="SELECT * FROM cars WHERE make LIKE '$searchmake'"; } if(isset($column_name) and strlen($column_name)>0) { $query = $query . " order by $column_name"; } $query = $query. " limit $eu, $limit "; $result=mysql_query($query); echo mysql_error();
  23. First off, that's not a form, that's just a function that checks for some errors. I asked for process.php but specifically the part where you call addNewUser(). You should echo out location before you call the addNewUser() and backtrack from there.
  24. Are you using a VARCHAR for this...?
  25. No echo... are you sure? Can post where you invoke the addNewUser() method in process.php? No worries, I'm not wound up at all.
×
×
  • 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.