3
Contributors
7
Replies
41
Views
2 Years
Discussion Span
Last Post by AntonyRayan
1

Really, I thought here is a forum which help solve problems but not generating codes for people. But by the way you can show us what you have done, so maybe we can continue it for you.

0

Really, I thought here is a forum which help solve problems but not generating codes for people.

Spot on Gideon. It is, so let's wait for Antony to come back with his markup and any associated PHP. Also the DB schema would be useful.

0

My DB Name: qa,
Table name:mst_qa_categoryn with fields such as id, category.

 <?php
 //session_start();
 //error_reporting(0);


if(@$_REQUEST["mode"]=="save"){

mysql_query("INSERT INTO mst_qa_category (qa_category_type) VALUES ('".$_REQUEST["qatype"]."')");
    echo $_SESSION["msg"] = "Question Category Added!!!";
?>
<form name="qa" action="?mode=save" method="post" enctype="multipart/form-data" onSubmit="return validate();">
                    <input type="hidden" name="qa_category_id" id="qa_category_id" value="<?php echo $_REQUEST["qa_category_id"];?>"/>
                      <div class="form-group">

<span style="font-size:12px; color:#FF0000; font-weight:bold; margin-left:260px;">
<?php
    if(isset($_SESSION["msg"])){
        echo $_SESSION["msg"];
        $_SESSION["msg"] = "";
    }
?>


</span>

                        <label>Question Category</label>
                       <input type="text" name="qatype" id="easyqa"/>

                      <input  type="submit" id="submit" name="submit" value="SAVE"> 
                          <div align="center" style="font-size:16px"   id="disp"></div> 

                    </form>

I did for insert and I need for all the remaining operations in this form itself. How?

0

To do this, you cannot use just one form to do this. Maybe you can set up input buttons and on event such as onclick AJAX process the sql you wanna deal with.

But I think if you do something very similar to login and register then sessions will be of great help

0

I have no idea why you'd want to do anything other than INSERT in a registration form. If you can see a registration form, then you are not logged in and there is no way you should be able to manipulate user details.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.