/***save the user information to file***/
$first_name=$_POST['first_name'];
$last_name=$_POST['last_name'];
$mobile_number=$_POST['mobile_number'];
$office_number=$_POST['office_number'];
$addres=$_POST['address'];
$post_code=$_POST['post_code'];
$city=$_POST['city'];
$file=$_POST['file'];

/**data to file**/
$data='$first_name | $last_name | $mobile_number |$office_number |$addres | $post_code |city |$file\n';

Recommended Answers

All 2 Replies

What is your problem, please.

In line 12, you missed $ sign in the variable $city...

$data='$first_name | $last_name | $mobile_number |$office_number |$addres | $post_code |city |$file\n';

Try this, you will get it...

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.