Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

Lost content after submit form

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

Lost content after submit form

Postby xuquang » Tue Sep 11, 2012 6:49 am

I have a contact us page with fields:
- Name
- Email
- Content

After client submit, I use _$REQUEST to get it

Code: Select all
if(isset($_POST["submit"]))
{
   $txtName = $_REQUEST['txtName'];
   $txtEmail = $_REQUEST['txtEmail'];
   $txtContent = $_REQUEST['txtContent'];   
         
        // Insert data to database
}


But, sometimes, I lost data (txtContent ) on database. Please help me, I could not understand why?

Thanks
xuquang
New php-forum User
New php-forum User
 
Posts: 2
Joined: Tue Sep 11, 2012 6:28 am

Re: Lost content after submit form

Postby Acesystech » Thu Sep 13, 2012 11:16 pm

Use this code

if(isset($_REQUEST['submit']))
{
$txtName = $_POST['txtName'];
$txtEmail = $_POST['txtEmail'];
$txtContent = $_POST['txtContent'];

// Insert data to database
}
Acesystech
New php-forum User
New php-forum User
 
Posts: 35
Joined: Mon Aug 20, 2012 10:27 pm
Location: Ernakulam


Return to PHP coding => General

Who is online

Users browsing this forum: WebOutGateway and 2 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.