• saj123

    (@saj123)


    Hi..iam new to wordpress.. i designed a page.. now i have 3 input fields , i want to insert into table.. please tel me how to write in php coding?
    i tried the below code,but it was displaying the code totally.. not getting and inserting the values… please help me
    <?php
    $name=$_REQUEST[‘name’];
    $telephonenumber=$_REQUEST[‘telephonenumber’];
    $email=$_REQUEST[’email’];
    $store=$_REQUEST[‘store’];
    $button1=$_REQUEST[‘submit’];
    Hi <?php echo htmlspecialchars($_POST[‘name’]); ?>.
    <?php echo (int)$_POST[‘telephonenumber’]; ?> Telephone number.
    if($button1==Submit)
    {
    $data1= mysql_query (“insert into sample values (‘1′,’$name’,’$telephonenumber’,’$email’,’$store’)”) or die(mysql_error());
    echo “<p align=’center’><font size=’2′><b>Added Successfully</b></font></p>”;
    }
    ?>

  • The topic ‘how to insert values’ is closed to new replies.