Jump to content

Search the Community

Showing results for tags 'edit'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 3 results

  1. funbinod

    edit a record

    (feeling a bit difficult to describe) i am trying to edit a post on a mysql table. in it data is transferred from one row to previous data was recorded for "ID-1" and now data on some cell should be transferred to "ID-2" and that makes change to another table also. i succeeded to change data on another table and change on "ID-2". but i got difficulties to retrieve "ID-1" to change its value. the edit form is like this --- <form method ="POST" action="saleseditpost.php"><fieldset><legend><h1>Edit Sales Record</h1></legend><div class="form-field"><label>Customer Name:</label><select name="cname" id="cname"><option></option> <?php // select table $query = "SELECT * FROM customer"; $result = mysql_query($query); if (!$result) die("Unable to select database: " . mysqli_error()); // fetch data $rows = mysql_num_rows($result); for ($n = 0 ; $n < $rows ; ++$n) { echo "<option>" . mysql_result($result,$n,'cname') . "</option>" ; } ?></select> </div> <div class="form-field"> <label>S.N.: </label> <input type="text" name="sn" id="sn" value="<?php echo $rs-> sn ?>" readonly="readonly"> </div> <div class="form-field"> <label for="date">Date: </label> <input type="text" name="date" id="date" value="<?php echo $rs-> date ?>"> </div> <div class="form-field"> <label for="ref">Ref.No.: </label> <input type="text" name="ref" id="ref" value="<?php echo $rs-> ref ?>"> </div> <div class="form-field"> <label for="amt">Bill Amount: </label> <input type="text" name="amt" id="amt" value="<?php echo $rs-> amt ?>"> </div> <div class="form-field"> <input type="submit" value="EDIT" name="submit" id="submit"> </div></fieldset></form> the name selected from the <select> option is "ID-2". data retrieved through "$rs->" is for "ID-1". now when the edit form is submitted input name - "amt" is stored for "ID-2" and previous data "$rs-> amt" must be erased from "ID-1". i succeeded to store input "amt" to ID-2 but not succeeded to erase that from ID-1. actually i could not retrieve ID-1 i want to learn how to grab that previous ID? i used action script like this --- // grab cid from cname$resultcid = mysql_query("SELECT cid FROM customer WHERE cname = '$cname'");$rowcid = mysql_fetch_array($resultcid);$cid = $rowcid['cid'];// grab balance from customer$chkBal = "SELECT * FROM customer WHERE cname = '$cname'";$result = mysql_query($chkBal) or die(mysql_error());while($myRows = mysql_fetch_array($result)) {$balance = $myRows['bal'];$newBalance = $balance + $amt;$preSales = $myRows['sales'];$newSales = $preSales + $amt;}// grab s.n.$sn = ($_POST['sn']);$sql = "SELECT * FROM customer where cid = '$cid' ";$result = mysql_query($sql);$rs = mysql_fetch_object($result);$date = strtoupper($_POST['date']);$ref = strtoupper($_POST['ref']);$amt = strtoupper($_POST['amt']);$sql2= "UPDATE sales SET sn = '$sn',cid = '$cid',date = '$date',ref = '$ref',amt = '$amt' WHERE sn ='$sn'";$sql3= "UPDATE customer SET sales = '$newSales',bal = '$newBalance' WHERE cid ='$cid'";mysql_query($sql2)or die(mysql_error()); mysql_query($sql3)or die(mysql_error());
  2. Hi guys!I've searched the net for a bit now and i tried to search the forum here but to no luck, anyway i was just wondering if you were able to help me out with an audio tag.I want to add an audio tag, which is easy enough but i want it to... automatically play and loop, but... i only want the buttons to be mute and unmute or play and unplay, i don't mind if there is two buttons but it would be cool if it was one i have found 1 or 2 examples where they turn it into text buttons (but the HTML doesn't work for it) but i was wondering if you were also able to edit it so it was an image? Thanks
  3. hey eryone I want do edit a menu select , ex: a menu selct Date , how to display data from db in the menu select it , Can help me Thask befpre
×
×
  • Create New...