Maq
Administrators-
Posts
9,363 -
Joined
-
Last visited
-
Days Won
3
Everything posted by Maq
-
Count(*) only returns how many records, not a record. Can you please show me the fields in your database? Is there perhaps a field similar to "open_jobs"?
-
Let me guess Smith is the first record in the table? You're not comparing anything to extract the specific information. So you're always grabbing the first record in the table. You need to pass a variable for whatever link the user clicked... $query = "SELECT * FROM cms_users WHERE user_id = '$some_var'";
-
I think you can do this (not tested!): for($x=1;x{ $post_var = "pm" . $x; $array = $_POST['$post_var']; }
-
Kind of like what Brian W said, it's much easier to format the mail variables separate from the function (not tested!): $headers "whatever you need"; $subject = "Hello there"; $my_email = "tim@yahoo.com"; $message = " Contact letter ".$_GET['message']." "; mail("my email address", $subject, $message, $headers);
-
No problem, glad I could help, yeah there a topic solved button or something in the lower left hand.
-
Why do you need a foreach? Is this a static amount of checkboxes? You could just iteratively loop through.
-
Okay first thing, you need to learn when to use the <?php ?> tags. For example: ini_set ("display_errors", "1"); error_reporting(E_ALL); $subject="from ".$_GET['your_name']; $headers= "From: ".$_GET['your_email']."\n"; $phone="from: ".$_GET['your_phone']; $address="from: ".$_GET['your_address']; $headers.='Content-type: text/html; charset=iso-8859-1'; mail("my-e-mail address" Needs to be: ini_set ("display_errors", "1"); error_reporting(E_ALL); $subject="from ".$_GET['your_name']; $headers= "From: ".$_GET['your_email']."\n"; $phone="from: ".$_GET['your_phone']; $address="from: ".$_GET['your_address']; $headers.='Content-type: text/html; charset=iso-8859-1'; mail("my-e-mail address" //WTF is this!? ?> See the difference?
-
You need to learn the basics of PHP first. There's a lot of fundamental mistakes in your script. For example: " , $headers);
-
Brian W. is right the types you have should be the names. Do: One more question before we proceed, why don't you use POST rather than GET? It's easier and more secure. All you would have to do in your contact.php script would just use: //For your_name input field $_POST['your_name']; Also your code is all messed up. You don't use starting or ending php tags. For example you have: mail("my-emailaddress@here" First the here" is messed up, not even a finished line, second you're going from PHP to HTML without tags. Maybe they're not showing up because you didn't use the code tags like i suggested.
-
What are you trying to do? What errors are you getting? Have you tried echoing out values to make sure they're correct. Also, please use the code tags, makes life a lot easier.
-
You should see a "%20" instead of the spaces in the URL. Check out, urlencode(). You can also decode it using urldecode().
-
Displaying 2 numbers after decimal point (ie $100.00)
Maq replied to ringartdesign's topic in PHP Coding Help
printf ("%01.2f", $quote); -
It's not the & sign, well it is but first it's the space. You need to use URLencode().
-
So what's the consensus? Is LISP worth learning? Or is it basically a waste of time?
-
When the user clicks the link just execute that command and the session will stop.
-
Try echoing your values out to make sure they're correct. Also put: ini_set ("display_errors", "1"); error_reporting(E_ALL); At the top of your page for temporary error display.
-
And it's more efficient.
-
I agree but I wasn't referring to the DBA, I was referring to lampstax. Maybe he could look over the logs and find out what's going on.
-
Do you keep any kind of history log?
-
Start by reading this. Everyone is going to give you the same feedback... PHP Freaks SEO
-
This is going to be pretty inefficient depending on how much data you have to analyze but... Grab each letter and do if ($letter == strtoupper($letter)) $letter = " " . $letter; else //go to next Sorry for the quick pseudo but I hope you get my idea.
-
No problem, glad I could help.
-
$message = "</pre> <table>"; while($row589 = mysql_fetch_array($sql589)) { $message .= ""; $message .= "".$row589['PaymentInvoiceID'].""; $message .= "".$row589['PaymentDueDate'].""; $message .= "".$row589['PaymentPaid'].""; $message .= "".$row589['PaymentAccountID'].""; $message .= ""; } $message .= "</ta If you use $message in your body variable for the mail function then it will display all this info throughout the loop.
-
Could you please elaborate? I'm not entirely sure what you're asking.
-
The install went flawlessly but it wont boot. I guess it wasn't flawlessly now was it? You may want to take this up in a hardcore linux forum, this is mainly PHP. You probably won't get too much feedback. Also: Is not very helpful for anyone trying to help, try it again?