Web Hosting Talk







View Full Version : Need PHP programmer asap! (simple work)


boardr00
08-10-2004, 06:08 PM
I need to have some php code added to one page.

I need:
-One variable passed to page from form (post)
-Two if then statements using that variable
-A calculation of total cost at bottom depending on options selected in form.

I know ASP and thought I could do my own php. However, I can't seem to get it right. If someone would be willing to help me I would really appreciate it. I can pay you or I can recipricate the help in the future. Let me know asap!

Thanks, Ian

kneuf
08-10-2004, 06:57 PM
this is the wrong forum. it should be under "offers and requests"... but this is simple so u should be able to get this done for free.
if you know php check out: http://ca3.php.net/else
to get a post variable: $_POST['field']; replace field with the name of the form field

Doh004
08-10-2004, 09:55 PM
I'll help you out, I want to get some more experience with PHP.

Just tell me whatcha need, the exact details.

If you wanna talk, I'm usually on aim or msn :)

Oh yea for free ;)

boardr00
08-10-2004, 10:01 PM
What is your im username?

Doh004
08-10-2004, 10:18 PM
Ooops thought my aim and msn were in my profiel:

doh004
doh004@gmail.com

I'm origional, cant you tell ;)

bhanson
08-11-2004, 01:11 AM
I can also help you out, this is pretty simple and should not take very long. I don't like IMing programs, but you can pop over to our Live Support and I'll assist you there. (signature)

Burhan
08-11-2004, 02:33 AM
<form method="post" action="form.php">
<input type="text" name="fname" />
<select name="options">
<option value="1" selected>$1</option>
<option value="2">$2</option>
</form>

<?php
if ($_SERVER['REQUEST_METHOD'] == "POST")
{
$fname = isset($_POST['fname']) ? $_POST['fname'] : NULL;
$cost = $_POST['options'];

if ($fname == NULL)
{
echo "Sorry, you didn't enter a name";
die;
}
$shipping = 20;
echo "$fname your total cost is : ".$cost+$shipping;
}

boardr00
08-11-2004, 06:27 AM
THANK YOU! everyone! I finally got my page working. Special thanks to bhanson for his assistance. I would never make it without the community.