Can't update mysql records from a web page

Hi everybody,
I am beginning with Dreamweaver CS5.
I followed a video tutorial on how to visually design a data entry/update web page for a mysql database using server behaviors.
My problem is that I was able to insert records and see inserted records but when I try to update a record it doesn't work.
I don't get any error message, it just redirects me to the listing page as it's supposed to but doesn't take into account the changes I made.
Below are 2 printscreens along with the corresponding code.
Can someone help me please?
Records list web page :
Records list code :
<?php require_once('Connections/dw_nouvellenaissance.php'); ?>
<?php
// *** Display of registered users
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
  if (PHP_VERSION < 6) {
    $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  return $theValue;
mysql_select_db($database_dw_nouvellenaissance, $dw_nouvellenaissance);
$query_users_videostream = "SELECT * FROM videostream_users";
$users_videostream = mysql_query($query_users_videostream, $dw_nouvellenaissance) or die(mysql_error());
$row_users_videostream = mysql_fetch_assoc($users_videostream);
$totalRows_users_videostream = mysql_num_rows($users_videostream);mysql_select_db($database_dw_nouvellenaissance, $dw_nouvellenaissance);
$query_users_videostream = "SELECT * FROM videostream_users";
$users_videostream = mysql_query($query_users_videostream, $dw_nouvellenaissance) or die(mysql_error());
$row_users_videostream = mysql_fetch_assoc($users_videostream);
$totalRows_users_videostream = mysql_num_rows($users_videostream);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Videostream Users List</title>
</head>
<body>
<h3 align="center">Videostream Users List </h3>
<table  align="center" width="75%" border="1" cellspacing="0" cellpadding="0">
<tr align="center" BGCOLOR="#99CCFF">
      <th>Surname</th>
      <th>Name</th>
      <th>City</th>
      <th>UserID</th>
      <th>Password</th>
      <th>Edit</th>
      <th>Delete</th>
    </tr>
<?php do { ?>
    <tr align="center">
      <td><?php echo $row_users_videostream['Nom'];?></td>
      <td><?php echo $row_users_videostream['Prenom'];?></td>
      <td><?php echo $row_users_videostream['Ville'];?></td>
      <td><?php echo $row_users_videostream['user_name'];?></td>
      <td><?php echo $row_users_videostream['user_password'];?></td>
      <td><a href="modifyuser.php?User_id=<?php echo $row_users_videostream['User_id']; ?>"><img src="images/edit.png" alt="modifier" width="15" height="15" hspace="5" /></a>
      <td><a href="deleteuser.php?User_id=<?php echo $row_users_videostream['User_id']; ?>"><img src="images/delete.png" alt="supprimer" width="15" height="15" hspace="5" /></a></td>
    </tr>
<?php } while ($row_users_videostream = mysql_fetch_assoc($users_videostream)); ?>
</table>
<p> </p>
<p align="center"><a href="formlogoutadmin.php">Deconnexion</a></p>
</body>
</html>
</body>
</html>
<?php
mysql_free_result($users_videostream);
?>
Udate records web page:
Update records code:
<?php require_once('Connections/dw_nouvellenaissance.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
  if (PHP_VERSION < 6) {
    $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  return $theValue;
//*** Update User
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
  $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "usersform")) {
  $updateSQL = sprintf("UPDATE videostream_users SET Nom=%s, Prenom=%s, Ville=%s, user_name=%s, user_password=%s WHERE User_id=%s",
                       GetSQLValueString($_POST['Nom'], "text"),
                       GetSQLValueString($_POST['Prenom'], "text"),
                       GetSQLValueString($_POST['Ville'], "text"),
                       GetSQLValueString($_POST['user_name'], "text"),
                       GetSQLValueString($_POST['user_password'], "text"),
                       GetSQLValueString($_POST['User_id'], "int"));
  mysql_select_db($database_dw_nouvellenaissance, $dw_nouvellenaissance);
  $Result1 = mysql_query($updateSQL, $dw_nouvellenaissance) or die(mysql_error());
  $updateGoTo = "showusers.php";
  if (isset($_SERVER['QUERY_STRING'])) {
    $updateGoTo .= (strpos($updateGoTo, '?')) ? "&" : "?";
    $updateGoTo .= $_SERVER['QUERY_STRING'];
  header(sprintf("Location: %s", $updateGoTo));
$colname_users = "-1";
if (isset($_GET['User_id'])) {
  $colname_users = $_GET['User_id'];
mysql_select_db($database_dw_nouvellenaissance, $dw_nouvellenaissance);
$query_users = sprintf("SELECT * FROM videostream_users WHERE User_id = %s", GetSQLValueString($colname_users, "int"));
$users = mysql_query($query_users, $dw_nouvellenaissance) or die(mysql_error());
$row_users = mysql_fetch_assoc($users);
$totalRows_users = mysql_num_rows($users);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=charset=iso-8859-15" />
<title>Modify User</title>
</head>
<body>
<h1>Welcome Daniel</h1>
<h3 align="left">Please modify user fields then click OK</h3>
<form action="<?php echo $editFormAction; ?>" method="POST" name="usersform" id="usersform">
<input name="User_id" type="hidden" value="" />
<table align="left" width="50%">
  <tr align="left">
  <th>Surname: </th><td><input name="Nom" type="text" id="Nom" value="<?php echo $row_users['Nom']; ?>" /></td>
</tr>
<tr align="left">
  <th>Name :</th><td><input name="Prenom" type="text" id="Prenom" value="<?php echo $row_users['Prenom']; ?>" /></td>
</tr>
<tr align="left">
   <th>City: </th><td><input name="Ville" type="text" id="Ville" value="<?php echo $row_users['Ville']; ?>" /></td>
</tr>
<tr align="left">
  <th>User ID:</th><td><input name="user_name" type="text" id="user_name" value="<?php echo $row_users['user_name']; ?>" /></td>
</tr>
<tr align="left">
<th>Password:</th><td><input name="user_password" type="text" id="user_password" value="<?php echo $row_users['user_password']; ?>" /></td>
</tr>
<tr align="left">
<td> </td><td align="left"><input type="submit" name="valider" value="Update" /></td>
</tr>
</table>
<input type="hidden" name="MM_update" value="usersform" />
</form>
</body>
</html>
<?php
mysql_free_result($users);
?>

Daniel Cronin,
This link has information on preparing movies for viewing online by an iPhone:
https://developer.apple.com/iphone/devcenter/designingcontent.html
Click on the drop down menu for "Ensure a Great Audio and Video Experience".
You may need to register for Apple Developer Connection in order to view that information.
Hope this helps,
Nathan C.

Similar Messages

  • Unique data record means you can't  update a record from ECC with same key.

    Unique data record means you can't  update a record from ECC with same key fileds right?
    Details: For example i have two requests Req1 and Req2 in DSO with unique data record setting checked. on day one Req1 has a filed quantity with value 10 in Active data table. On day two Req1 can not be overwitten from ECC with Req2 with the same key fields but different value 20 in the filed quantity because of the Unique data record settings. finally the delta load fails from ECC going to DSO because of this setting. is it right?
    I think we can only use unique record setting going from DSO to cube right?
    Please give me a simple scenario in which we can use this setting.
    I already search the threads and will assign points only to valuable information.
    Thanks in advance.
    York

    Hi Les,
    Unique Data Records:
    With the Unique Data Records indicator, you determine whether only unique data records are to be updated to the ODS object. This means that you cannot load a data record into the ODS object the key combination for which already exists in the system – otherwise a termination occurs. Only use this setting when you are sure that only unique data records are to be loaded into the ODS object (for example, single documents). A typical application of this is in the loading of mass data. It improves the load performance.
    Hope it Helps
    Srini

  • Why can I not print anything from a web page?

    Why can I not print anything from a web page?

    Thank you, but I still haven't solved my problem. I tried the reset suggestion. But I cannot find print.print_printer preference. Maybe the word "printer" is to be replaced with the name of my printer. But because of the warning that making any changes is a very dangerous thing to do, I hesitated to do anything.
    I have located the Print to file option, but it is not checked.
    This problem did not exist before the Firefox update of about 6 months ago. Today I downloaded the latest Firefox update, hoping that would solve my problem, but it did not.
    Thank you for your continued assistance.

  • Why can I not download something from a web page?

    This is probably a stupid question, but I am totally new to this.
    This probably is not the appropriate place to ask, but is there a way to download a .exe that I need for a clients laptop (in the field) onto my iphone and then USB it to the laptop? I'm pretty sure about the USB part, but I was told by AT&T today that the iphone will not download programs like that from a web page. I do not want to run them on the iphone, just transfer them to a PC.
    Maybe I should return the phone.
    Thanks, your help is very much appreciated.
    David.

    The iPhone doesn't allow downloading of stuff (except saving of Pictures). It also doesn't allow you to take stuff off via the USB...there is no disk access to the phone, it is not a thumb drive. It is a closed and protected file system that requires iTunes to sync stuff to or remove...sorry.

  • When a portfolio is opened, can we load a document from a web page?

    We have a number of pdfs that reside on a web site.
    We are in the process of creating a portfolio for use in a different way and a number of these documents would be good additions to the portfolio.
    We would prefer not to have to maintain these pdfs in multiples places (original web site  and the portfolio).
    Is there a way with in a portfolio to load a pdf from a web site when the portfolio is opened?

    First to permanently delete every trace of Babylon try here '''cor-el''' reply:
    https://support.mozilla.com/en-US/questions/782060
    second to set google as home page see here:
    [http://support.mozilla.com/en-US/kb/How%20to%20set%20the%20home%20page How to set the home page]
    * try to update firefox because you are in beta version 4.0b10 and it is unsupported and beta(trail unstable version)
    thank you
    Please mark "Solved" the answer that really solve the problem, to help others with a similar problem.

  • Can't create a PDF from a Web page using acrobat 8.0

    I am using Acrobat 8.0, + Mac 10.5. When, in Acrobat, the dialog box comes up (File>Create PDF from Web) I first enter the URL, then try to click on "Settings" but nothing happens. Then I get an error message. Is this a known problem?

    If the url is for a secured web site Acrobat can not always get the data as it is not logged into the web site. Some web features can not be converted to the PDF format. Is the web address correct? I would use cut and paste since some web addresses can be quite hard to type in.

  • How can i collect  email addresses from my web page viewers

    I would like to set up a way that if my website viewers are interested (volunterily), they can submit me their email addresses or phone numbers for further contact.
    How do I do this in iweb?
    thanks

    Welcome to the Apple Discussions. You can use a Wufoo form like Alancito suggested or create your own link on this demo page: Form Action comment form.
    The Form Action type of form uses the visitors email client to send the information to you. With Wufoo it's done from Wufoo. Wufoo does have a limit to the number of responses you get for free.
    OT

  • Safari iPhone can't play QT movies from certain web pages

    I'm trying to reach QT movies from certain websites and I can't seem to get the streaming video to play in Safari on my iPhone.
    When I click on the link, it opens a new page. I briefly get a Quicktime logo, then I get a "cannot play" icon (triangle with a stop symbol).
    When I go through a regular browser, I can see the file is a .mov file. It seems to be a smallish file - about 2 minutes at 320x240 size? I don't know what the bit rate is.
    Any help would be appreciated. Thanks!
    By the way, I love my iPhone!

    At this time .Mov files are not compatible with the iPhone.
    The website would need to re-encode their movie into an H.264 video
    iPhone Video Specifications posted below
    http://support.apple.com/specs/iphone/iPhone.html
    Video
    Video formats supported: H.264 video, up to 1.5 Mbps, 640 by 480 pixels, 30 frames per second, Low-Complexity version of the H.264 Baseline Profile with AAC-LC audio up to 160 Kbps, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats; H.264 video, up to 768 Kbps, 320 by 240 pixels, 30 frames per second, Baseline Profile up to Level 1.3 with AAC-LC audio up to 160 Kbps, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats; MPEG-4 video, up to 2.5 Mbps, 640 by 480 pixels, 30 frames per second, Simple Profile with AAC-LC audio up to 160 Kbps, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats

  • Meta data information from dynamic web page

    Dear all,
    for website searching, we should put the meta data in every page, in my case
    i have to get the data from dynamic page(data are coming from database).
    So, how can i meta data information from dynamic web page
    kindly suggest.
    thanx,
    R. Ramasubramanaim.

    Build your web application with BSP, that's all I can say...

  • How to obtain table data that is hidden from a web page source?

    Hello!
    I have been trying to obain table data from a web page without success. The data can be copy and pasted from the web page but it can´t be found in the web page source.  I prefer NOT to use automated mouse clicks to obtain the data through CTRL-A, CTRL-C and then to the Clipboard ( I know how to do this but it is not so elegant :-) ). I tried to get the data automatically with the following code: (See snippet)
    I have also looked at the existing solutions in the forum for Loging in to a website but the difference here is that I am just interested in getting out the data from a Table (form or element? I am not so familiar with HTML nor JAVA)
    Any tips are appreciatted.
    Attachments:
    Get Web Table Data example.png ‏53 KB

    The trick is to get the current html of the page and not the source - the source will not render the javascript of the page which is what loads/populates the table. It's the difference between inspecting an element in Chrome and viewing the source.
    You'll need to see if there's a method/property that returns the 'live' html document object model after the Javascript has populated the table rather than the source of the page.
    You may also have more success trying to replicate the same method the webpage uses to actually load the data..it probably makes a request to a page which returns the scores information in a more 'raw' format rather than having to parse out the html elements yourself.
    (Also as an aside - Java is not the same as Javascript - one is a compiled language and one is a scripting language).
    Certified LabVIEW Architect, Certified TestStand Developer
    NI Days (and A&DF): 2010, 2011, 2013, 2014
    NI Week: 2012, 2014
    Knowledgeable in all things Giant Tetris and WebSockets

  • Why does Acrobat suddenly not work on my Mac (won't open pdf files from a web page), yet I can open them from my iPhone? Everything worked fine yesteray.

    Hello:
    I have a Mac running OS 10.8.5 and I use Acrobat Pro and Acrobat Reader. Today for some reason, any time I try and access a pdf file from a web page, it won't open. I get a blank window. PDF files already on my computer open fine and I can create PDF files from Word docs, but I can't download or view any pdf file from any web page. Strangely, PDF files on web pages open just fine on my iPhone.
    I checked that both my copy of Acrobat Pro and Acrobat Reader are up-to-date. They are.
    I checked that my copy of Firefox is up-to-date. It is. And nothing changed with Firefox within the last 24 hours.
    I am a humble computer end-user. I am baffled as to why this would suddenly not work. I have not changed any settings, etc. Any help or suggestions would be greatly appreciated.

    Thank you.
    I checked your instructions you sent and as far as I can tell all of my settings, etc for Firefox (plugin updates and preferences) are correct but I am having the same problem.
    However, everything works in Safari. I don't have time to attempt to diagnose why Firefox no longer works. I will just switch to Safari.
    Many thanks.
    Charles
    Charles Deister
    (503) 949-5762
    [email protected]<applewebdata://81CB4171-226F-49DF-BD59-A38A7360B3FB/[email protected]>
            PO Box 5032
         Salem, OR 97304
    http://www.pilotstrat.com<http://www.pilotstrat.com/>
    This transmission (including any attachments) may contain confidential information, privileged material, or constitute non-public information. Any use of this information by anyone other than the intended recipient is prohibited. If you have received this transmission in error, please immediately reply to the sender and delete this information from your system. Use, dissemination, distribution, or reproduction of this transmission by unintended recipients is not authorized and may be unlawful.

  • My  ipod touch is 3rd gen how can i update my ios from 4.2.1 to 5.1.1 when i shift   restore and load the ipod3_5.1.1.ios its always say your firmware is not compatible

    my  ipod touch is 3rd gen how can i update my ios from 4.2.1 to 5.1.1 when i shift + restore and load the ipod3_5.1.1.ios its always say your firmware is not compatible

    I suspect you have a 2G iPod. Those can only go to iOS 4.2.1.
    Identifying iPod models
    iPod touch (3rd generation)
    iPod touch (3rd generation) features a 3.5-inch (diagonal) widescreen multi-touch display and 32 GB or 64 GB flash drive. You can browse the web with Safari and watch YouTube videos with Wi-Fi. You can also search, preview, and buy songs from the iTunes Wi-Fi Music Store on iPod touch.
    The iPod touch (3rd generation) can be distinguished from iPod touch (2nd generation) by looking at the back of the device. In the text below the engraving, look for the model number. iPod touch (2nd generation) is model A1288, and iPod touch (3rd generation) is model A1318.

  • Update multiple records from a list

    Just trying to find some tutorials on how to update multiple
    records from 1
    page of checkboxes
    easiest example is hotmail
    i would like to be able to give my clients the ability to
    delete or update
    multiple records from 1 page... mind you that this type of
    update woudl only
    be for simple status changes, flags that need to be changed
    and so on...
    Delete... well if they made it to this page they are already
    sure and have
    been warned that they are going to delete the records..
    where can i find such a tutorial on how to complete multiple
    record updates
    or deletes from 1 form...
    thanks

    Server model and software below.
    And hotmail has nothing to do with anything.. its an example
    of what i would
    like to be able to do...
    If you log into hotmail. you have the option to check all the
    emails you
    want to delete.
    well thats what i want to do with my clients sites...
    Each record would have its own checkbox, they select the
    records they want
    to delete or update and they hit submit to process there
    request.
    Using ASP, SQL2005 and DW8
    "bregent" <[email protected]> wrote in
    message
    news:f21upb$nop$[email protected]..
    > >Just trying to find some tutorials on how to update
    multiple records from
    > >1
    >>page of checkboxes
    >
    > What server model?
    >
    >>easiest example is hotmail
    >
    > What does hotmail have to do with this.

  • Can we update the data from SSRS report to any database ?

    Hi Team,
    Greetings !!!!
    Can we update the data from SSRS report to any database ?
    Thanks,
    Anand Gavle.

    Nope SSRS doesnt have write back options. Its just a reporting tool
    However one thing you can do is to link a webpage from SSRS report and do the changes through it
    SSRS has the ability to navigate to web page through which you can capture any data inputs from users and save it to your db.
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • How can I use Automator or AppleScript to get text from a web page and paste it in execl?

    I don't know how to make scripts or complexed automator workflows... that's why I'm asking.
    I'm trying to make a simple app or script to ask me what text to extract from a web page, like name, address and phone number of a web page and paste each one of these data in the righ cell of excel.
    I was thinking to promt a request from automator or an applescript to ask me which text to extract from the page or to look throught the HTML of the page to search for specific html tags, from which extracting text and then importing it, or paste it to the specified execl cell. Name in the name cell, address in the address cell and so on.
    Can somebody help me to make this script?
    If you know an alternative, like a software that already do this or another language to use, please tell.

    Try holding down the alt key as you mark the text to be copied. You can then copy columns to table text.

Maybe you are looking for