Im needing help with figuring out this undefined variable

I have made a contact form and it seems everything is working fine except that I when i file the form out and click add contact I get undefined variable for all the text box fill ins.
correct me if I’m wrong but when you add:

<tr><td>First Name&nbsp;</td><td><input type="text" name="fname" /></td></tr>

fname is the variable and therefore is defined. So when you go to php page and add:

$fname = $_post['fname'];

the variable fname has previously been defined so there shouldn’t be a problem. Am I correct? I trying to figure out the root of the problem. It’s saying the undefined variable is in my addcontacts.php .

Doh!! scratch everything. It’s $_POST I had it as $_post. Well sat up looking at this until 2 am and woke up finally seeing it…Coffee and sleep is my friend.

Try using get instead of post

ahh yeah $_POST is case sensitive so $_POST is not the same as $_post but i think you already figured that out lol

lol yeah I figured that one out… :P…took me 4 hours to figure it out… I just wish my GUI editor would have picked up on it… ugh!! well sleep and coffee help me get it…

One thing I can say though Wilson I am really loving this PHP. It’s fun putting these scripts together. Even when I got a problem, once I figure it out it’s cool to see these codes come together and work.

I can say you feel the same way i feel i’m programming LOL

i take it like a challenge and it’s fun when you accomplish something

Yes, I totally agree with you Wilson. I really enjoy figuring these problems out even though they can sometimes make you pull your hair out. Once I catch a good understanding of php I would like to try and make a chat site. Flash maybe. I am assuming all the coding for controlling the different parts like sending messages and controlling the A/V and admin/mods control are written in php. I know I probably got some time before I get to that point, but I am having a blast learning this.

good luck buddy.

Thanks Wilson, Everything takes time. I will enjoy this learning experiance.

Sponsor our Newsletter | Privacy Policy | Terms of Service