Maq
Administrators-
Posts
9,363 -
Joined
-
Last visited
-
Days Won
3
Everything posted by Maq
-
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].
-
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)) {
-
Do you have your mail setup properly? Read more here. Again, we need to see your mailform.php.
-
Put this code to loop until 100 and see what it outputs...
-
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);
-
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);
-
Why are you taking out the .00? Are you rounding the amount to the nearest dollar?
-
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.
-
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.
-
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...
-
Nope, not on the list.
-
You need to format it using the date() function.
-
This will output a descriptive error. mysql_query("INSERT INTO accounts (username,password) values ('love','love')") or die(mysql_error());
-
No ';' mysql_query("INSERT INTO accounts (username,password) values ('love','love')");
-
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.
-
Your error refers to line 28, but you only have 26 lines of code...
-
That's a lot of information, what are you specifically having trouble with?
-
Update that record with the new string and appended to it.
-
You need to keep backtracking to where it gets passed to and find out where its losing its value.
-
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){
-
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?
-
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();
-
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.
-
Are you using a VARCHAR for this...?
-
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.