Jump to content


Update Recordset via form

  • Please log in to reply
No replies to this topic

#1 barney0o0

  • Members
  • PipPipPip
  • Advanced Member
  • 103 posts

Posted 26 June 2006 - 06:28 PM

Hey...i making a very simple content management system.

Im making a form to update a record. Im not too sure how to do this in the Dreamweaver enviroment, however i want to give the user who updates the recordset the option to either enter a filename into a field or use a dropdown menu to select a filename (thats a dynamic list form a recordset).

I have been thinking about 2 radio buttons....one that refers to the dropdown menu and one that refers to the maual insert field......however, how could i edit the script that if RadioA is clicked, send info from dropdown to 'filename' (in the recordset)or if RadioB is clicked, send info from manual input field to 'filename'....

Ive has a search around and found something like ;

IF ($_POST['RadioA']=="on") {
    //do whatever with this fileplace
} ELSE IF ($_POST['RadioB']=="on") {
    //upload new file

But im not to sure where to ad this to the usual dreamweaver update/insert record behaviour around the area of:

if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
  $insertSQL = sprintf("INSERT INTO guest (FName, Sname, UserName, Email, Password) VALUES (%s, %s, %s, %s, %s)",
                       GetSQLValueString($_POST['fname'], "text"),
                       GetSQLValueString($_POST['surname'], "text"),
                       GetSQLValueString($_POST['uname'], "text"),
                       GetSQLValueString($_POST['mail'], "text"),
                       GetSQLValueString($_POST['pass'], "text"));

...i hope this makes sense!...thanks in advance

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users