MARITAL STATUS IS ON LINE 26 FROM THE FOLLOWING CODE.


<?php
// Get values from form
$SURNAME=$_POST;
$MIDDLENAME=$_POST;
$FIRSTNAME=$_POST;
$COLLEGE=$_POST;
$MARITAL STATUS=$_POST;
$GENDER=$_POST;
$PHONE NUMBER=$_POST;
$ROOM NAME=$_POST;
$GURDIANS NUMBER=$_POST;

Recommended Answers

All 3 Replies

One thing friend please put the code in a well manner so its identifiable. I can't get your line no.:26.
After checking I think its on line

$MARITAL STATUS=$_POST['MARITAL STATUS'];

Remove space as variable does not allow space
The line would be

$MARITAL_STATUS=$_POST['MARITAL_STATUS'];

make changes in the form

Also, you have the following variables containing spaces:

$MARITAL STATUS=$_POST['MARITAL STATUS'];
$PHONE NUMBER=$_POST['PHONE NUMBER'];
$ROOM NAME=$_POST['ROOM NAME'];
$GURDIANS NUMBER=$_POST['GURDIANS NUMBER'];

You have to remove the spaces or replace them with something like the underscore.

commented: Good. +4

Changes in the HTML form should also be considered as rv1990 hinted; for example, if you have the following text field:

<input name="MARITAL STATUS" type="text" ....>

You have to make a change in its name in the same way as Hani1991 said. E.g.

<input name="MARITAL_STATUS" type="text" ....>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.