Hi,
I need a code for inserting, viewing, editing, deleting in a single registration form in simple way.

Recommended Answers

All 7 Replies

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.

Can you send me the fields you want use in creating this form

Member Avatar for diafol

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.

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?

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

Member Avatar for diafol

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.

Instead of doing in multiple pages I want to do in a single form.

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.