Php/mysql update

I can not find how to get the new fix for php/mysql any body
know how ?

New fix?
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com
- Template Triage!
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
http://www.macromedia.com/support/search/
- Macromedia (MM) Technotes
==================
"3DForce" <[email protected]> wrote in
message
news:ehd6aj$gf1$[email protected]..
>I can not find how to get the new fix for php/mysql any
body know how ?

Similar Messages

  • PHP/MySQL updates within OS X S and Security updates?

    Hey All,
    Does anyone know of a link that will provide any info about PHP, PHP plug-in, or MySQL updates that are included in the Server OS or security updates, or any other software updates? This way I won't have to read through all of Apple's support articles for all OS and security updates.
    Updating a bunch of web servers from OS X S 10.6.3 to OS X 10.6.6
    Thank you in advance!

    Great news thanks!

  • PHP/MySQL-Update/Insert Record JavaScript Won't Work!!!

    Hi. I'm consistently running into the following error when I use the update or insert record script in CS4. I've tried deleting the FileCache file. I've tried quitting and relaunching, etc. Anyone else seeing this happen? Solutions anyone? Thanks in advance...
    I'm beginning to think it has something to do with the database, and not the script. Does anything in the screenshot below look wrong or problematic?
    Okay, I found the problem. Shouldn't be a problem, but it is...
    The Field name "length" changed to "height" eliminated the problem. So, you can't use the word "length" in a field? Sounds weird to me.

    airsoftie wrote:
    Okay, I found the problem. Shouldn't be a problem, but it is...
    The Field name "length" changed to "height" eliminated the problem. So, you can't use the word "length" in a field? Sounds weird to me.
    There are lots of words you can't use for column names in MySQL, but "length" isn't one of them. See http://dev.mysql.com/doc/refman/5.1/en/reserved-words.html.
    The problem arises because Dreamweaver uses JavaScript behind the scenes to populate dialog boxes and build server behaviors. In JavaScript, "length" is the property of an array. I suspect the problem is that using "length" as a column name has given the relevant JavaScript used by Dreamweaver indigestion.

  • PHP/MySQL issue after security update 2010-005

    Hello,
    I run Apache/PHP/MySQL on my MBP for testing Web sites.
    After the 2010-005 security update I can't connect to my databases anymore.
    I don't know how to fix this, I even don't know where to start looking.
    Ideas, anyone?

    coloma wrote:
    etresoft, thanks for sharing this ... I decided to go with the TriangleJuice suggestion instead for two reasons ... first is that I wasn't sure where to find this launchd file.
    There is nothing wrong with TriangleJuice's suggestion. My only issue with creating a php.ini file is that now I have to worry about all those other settings in the ini file. If something else in PHP breaks, I have to figure out if I am the one who broke it.
    Apple ships MySQL with MacOS X Server. They probably adjusted the PHP settings to match how they have MySQL setup in MacOS X Server.
    For MySQL's, no, Sun's - drat! no, Oracle's part, they still haven't acknowledged the fact that Apple has shipped MacOS X 10.4. MySQL still ships with a Startup Item. If you don't know where the launchd file is, it is because you don't have one. You probably have a MySQL entry in /Library/StartupItems or maybe /System/Library/StartupItems. Startup Items were deprecated in 10.4. Oracle should be creating a file named com.mysql.mysqld.plist in /Library/LaunchDaemons.
    Here is what mine looks like now:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
    <key>KeepAlive</key>
    <true/>
    <key>Label</key>
    <string>com.mysql.mysqld</string>
    <key>ProgramArguments</key>
    <array>
    <string>/usr/local/mysql/bin/mysqld</string>
    <string>--socket=/var/mysql/mysql.sock</string>
    <string>--basedir=/usr/local/mysql</string>
    <string>--datadir=/usr/local/mysql/data</string>
    <string>--user=mysql</string>
    <string>--log-error=/usr/local/mysql/data/Pele.local.err</string>
    <string>--pid-file=/usr/local/mysql/data/Pele.local.pid</string>
    </array>
    <key>RunAtLoad</key>
    <true/>
    </dict>
    </plist>
    I also don't have a /var/mysql directory and wasn't sure whether I should just create one or if this meant my configuration was different. If you feel like explaining any of this, I'd be curious to know.
    You have to create one. Such a directory probably already exists on MacOS X Server. Just make sure it is owned by mysql.
    sudo mkdir /var/mysql
    sudo chown _mysql:staff /var/mysql
    sudo chmod 0755 /var/mysql
    [jdaniel@Pele:516] /var $ ls -al /private/var | grep mysql
    drwxr-xr-x 3 _mysql staff 102 Aug 26 20:03 mysql
    Of course, /var is a symbolic link to /private/var. Long story there.

  • How to update PHP, MySQL or Apache

    The Mac OS X 10.6.2 system does not include the latest versions of PHP, MySQL or Apache.
    What is the recommended update procedure for PHP, MySQL or Apache:
    a) automatically by Mac OS X system (is this possible?) or
    b) manually by the administrator (are there any documentations?)
    Many thanks.
    Actual system versions:
    Mac OS X 10.6.2
    MySQL 5.0.82
    Apache 2.2

    Hi, Thanks for your answer.
    That sounds Apple do not seriously release updates of third party packages shipped with the system (like Apache, mySQL ...) very often.
    To use month or year old packages in a web environment is a big risk, e.g. mySQL actual official version is V5.50 / mySQL Version shipped and updated by Mac OS X 10.6.2 Server is V5.0.82).
    The same with Apache and PHP, both are packages included in Mac OS X Snow Leopard Server product by Apple and are included in a old version.
    And when manually updates by the administrator of the server system do not work well or are not supported by the OS X Server system (as I understand your posting), the administrator can not act to improve and secure the system.
    That can only lead to one conclusion: Apple's Mac OS X Snow Leopard Server should not be used in a productive, internet faced web environment.
    Is this true? I do not want to believe this!?
    Is there really no official supported or documented procedure by Apple to keep the integrated third party components updated?
    I'd like to prefer Mac OS X Server odd Linux distribution because it seems more handy to administrate and to use, e.g. tools like Server Admin. These tools are an advantage of Mac OS X Server.

  • Best way to update images using PHP / MySQL?

    HI
    I want to update images using PHP/MySQL, so users can update their images and maybe some other files but mainly images.
    thanks

    How messed up is this code?!
    <?php
    //connect to database
    $con = mysql_connect("testhost","testuser","pass");
    // file properies
    $file = $_FILES['image']['tmp_name'];
    if (!isset($file))
    echo "please select an image";
    else {
        $id = $_REQUEST['id_display'];
        $image = ($_FILES['image']['tmp_name']) ? file_get_contents ($_FILES['image']['tmp_name']) : '';
        $image_name = ($_FILES['image']['name']) ? addslashes($_FILES['image']['name']): '';
        $image_size = ($_FILES['image']['tmp_name']) ? getimagesize($_FILES['image']['tmp_name']): '';
        if ($image_size == FALSE)
        echo "You have not selected an image.";
        else {
            mysql_select_db("test_display", $con);
            mysql_query("UPDATE testtable SET image = '$image', imagename = '$image_name' WHERE id_display='$id'");
    ?>
    And the upload page....
    /*Update code */ /*End update code */                            

  • Updating to 10.4.11 killed my PHP/MYSQL connections

    Hi all - I use Dreamweaver CS3 for web development, and have been using some very simple PHP/MYSQL Select and Inserts. Everything was working fabulously up until this morning, when I updated to 10.4.11 (Macbook Pro, CoreDuo). As soon as I updated, I get a 'No Database Selected' message in Safari, Firefox and IE. I can see the database and work with it in DWeaver, just can't get it to go live in browsers.
    I'm running PHP 5.2.4, MYSQL 5.1.8 and whatever version of Apache is bundled in OS X (I think it's 1.x - but can't find how to get that number!)
    Just for record, I have stopped/restarted Personal Web Sharing, Personal File Sharing, OS X, MYSQL to just check whether something wasn't working there.
    I'm about to close out, zap the PRAM and then come back in.
    Any ideas?
    Vince

    Thanks - A couple of additional points. This is OS X 10.4.11, not OS X Server, so I had installed MYSQL and PHP as fresh installations. MYSQL has not changed since I installed and is running fine through direct client (Navicat).
    For PHP I was running 4 and it had been running fine. When the update to OSX came through, PHP 4 didn't work - no change had been made to any configuration file that was working already. These are the httpd.conf instructions I had followed to set-up PHP 4:
    +1 Launch Terminal from /Applications/Utilities.+
    +2 Open the Apache configuration file and edit the UNIX shell prompt:+
    +sudo pico /etc/httpd/httpd.conf+
    +3 When prompted for a password, enter the Mac OS X administrator account password.+
    +4 Uncomment the following lines:+
    +LoadModule php4_module libexec/httpd/libphp4.so+
    +AddModule mod_php4.c+
    +5 Add the following lines (add these lines above: AddType application/x-tar .tgz):+
    +AddType application/x-httpd-php .php+
    +AddType application/x-httpd-php-source .phps+
    +Note: All the commands for the pico editor display on the screen and you can start any commands with the Control key. Use the arrow keys to move around. Pico is a text editor, mostly for UNIX users to use at the UNIX command line. The pico text editor resides in /usr/bin/ directory.+
    +6 Add a new index page for PHP (index.php) so that the web server will recognize it as the first page to load:+
    +<IfModule mod_dir.c>+
    +DirectoryIndex index.html index.php index.htm+
    </IfModule>
    +7 Save the httpd.conf file by pressing ^X (control & x keys). When the screen asks "Save Modified buffer?", press "Y". When prompted for "File Name to write : httpd.conf", press Return once to accept it. This will return you to the UNIX shell prompt.+
    When PHP 4 stopped working, I took the decision to upgrade to 5 and then fix the breakdown (by now, I was convinced it was an Apache change (nothing in config had changed at all). So, upgraded to PHP 5 and, to do so, had to reverse the directions above. Since then, I've tried reenabling the above, replacing with PHP5 wherever PHP4 appears, all to no avail (in fact, it just froze the Personal Web Sharing that turns Apache on/off).
    Right now, running the phpinfo check detailed above tells me the PHP 5 is successfully installed and running. The text from the test copied here:
    +System Darwin Vincet-MacBook-Pro.local 8.11.1 Darwin Kernel Version 8.11.1: Wed Oct 10 18:23:28 PDT 2007; root:xnu-792.25.20~1/RELEASE_I386 i386+
    +_Build Date_ Aug 31 2007 23:38:11+
    +_Configure Command_ './configure' '--prefix=/usr/local/php5' '--with-apxs' '--with-config-file-scan-dir=/usr/local/php5/php.d' '--with-iconv' '--with-openssl=/usr' '--with-zlib=/usr' '--with-gd' '--with-zlib-dir=/usr' '--with-ldap' '--with-xmlrpc' '--with-iconv-dir=/usr' '--with-snmp=/usr' '--enable-exif' '--enable-wddx' '--enable-soap' '--enable-sqlite-utf8' '--enable-ftp' '--enable-sockets' '--enable-dbx' '--enable-dbase' '--enable-mbstring' '--enable-calendar' '--enable-bcmath' '--with-bz2=/usr' '--enable-fastcgi' '--enable-cgi' '--enable-memory-limit' '--enable-zip' '--enable-pcntl' '--enable-shmop' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--with-curl=shared,/usr/local/php5' '--with-mysql=shared,/usr/local/php5' '--with-mysqli=shared,/usr/local/php5/bin/mysql_config' '--with-pdo-mysql=shared,/usr/local/php5' '--with-libxml-dir=shared,/usr/local/php5' '--with-xsl=shared,/usr/local/php5' '--with-pdflib=shared,/usr/local/php5' '--with-imap=../imap-2004g' '--with-kerberos=/usr' '--with-imap-ssl=/usr' '--with-jpeg-dir=/usr/local/php5' '--with-png-dir=/usr/local/php5' '--enable-gd-native-ttf' '--with-freetype-dir=/usr/local/php5' '--with-iodbc=shared,/usr' '--with-pgsql=shared,/usr/local/php5' '--with-pdo-pgsql=shared,/usr/local/php5' '--with-t1lib=/usr/local/php5' '--with-gettext=shared,/usr/local/php5' '--with-ming=shared,/usr/local/php5' '--with-mcrypt=shared,/usr/local/php5' '--with-mhash=shared,/usr/local/php5' '--with-mssql=shared,/usr/local/php5' '--with-fbsql=shared,/Users/liyanage/svn/entropy/universalbuild/src/FBDeveloper Libraries/Library/FrontBase' '--with-json=shared' '--enable-memcache' '--enable-openbase_module'+
    +_Server AP_I Apache+
    +_Virtual Directory Suppor_t disabled+
    +_Configuration File (php.ini) Path_ /usr/local/php5/lib+
    +_Loaded Configuration File_ /usr/local/php5/lib/php.ini+
    +_Scan this dir for additional .ini files_ /usr/local/php5/php.d+
    +_additional .ini files parsed_ /usr/local/php5/php.d/10-extension_dir.ini, /usr/local/php5/php.d/50-extension-curl.ini, /usr/local/php5/php.d/50-extension-fbsql.ini, /usr/local/php5/php.d/50-extension-gettext.ini, /usr/local/php5/php.d/50-extension-json.ini, /usr/local/php5/php.d/50-extension-mcrypt.ini, /usr/local/php5/php.d/50-extension-mhash.ini, /usr/local/php5/php.d/50-extension-ming.ini, /usr/local/php5/php.d/50-extension-mssql.ini, /usr/local/php5/php.d/50-extension-mysql.ini, /usr/local/php5/php.d/50-extension-mysqli.ini, /usr/local/php5/php.d/50-extension-odbc.ini, /usr/local/php5/php.d/50-extension-pdf.ini, /usr/local/php5/php.d/50-extension-pdo_mysql.ini, /usr/local/php5/php.d/50-extension-pdo_pgsql.ini, /usr/local/php5/php.d/50-extension-pgsql.ini, /usr/local/php5/php.d/50-extension-xsl.ini+
    +_PHP API_ 20041225+
    +P_HP Extension_ 20060613+
    +_Zend Extension_ 220060519+
    +_Debug Build_ no+
    +_Thread Safety_ disabled+
    +Zend Memory Manager enabled+
    +_IPv6 Support_ enabled+
    +_Registered PHP Streams_ zip, php, file, data, http, ftp, compress.bzip2, compress.zlib, https, ftps+
    +_Registered Stream Socket Transports_ tcp, udp, unix, udg, ssl, sslv3, sslv2, tls+
    +_Registered Stream Filters_ string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, convert.iconv.*, bzip2.*, zlib.*+
    I don't know if any of this helps, but it's what I find. From my online troubleshooting and reading, I believe all of the above looks right and that things should work. So, I'm still left with an informed gut decision that something in the set-up of Apache changed (location in file structure, configuration file, etc.) Could it be looking at a second copy of httpd.conf somewhere else? That would seem to make sense - however I haven't managed to turn up how to assess which version of Apache is loaded (I think 1.3) or where it's located.
    If anyone can confirm what PHP5 code should be included in httpd.conf given the above, that would be a great next step.
    Thanks for all your assistance!
    Vince

  • Command in php / mysql

    Hello,
    I used to program a lot in ASP, and loved the command
    function.
    However, now that I'm programming in PHP I do not have this
    at my disposal unfortunately.
    How does everyone perform certain actions on forms right
    now?, for example I'm performing an update on a record, but want to
    update all records in the table first by setting a certain field to
    0.
    Any thoughts and ideas / samples are greatly
    appreciated!

    Jasmine2002 wrote:
    > Correct, in ASP however I had the command so I can later
    on easily call up the
    > box and change / add / update my SQL.
    >
    > Do you just write the appropriate PHP for it?, I don't
    really know how to
    > properly write this in conjuction with Dreamweaver.
    I suspect that command is probably a stored procedure.
    Unfortunately,
    stored procedures were added to MySQL only in version 5.0,
    and
    Dreamweaver doesn't support stored procedures in the PHP
    MySQL server
    model. (I've lobbied for support, but it hasn't happened
    yet.)
    Your update is rather unusual, but you should be able to get
    Dreamweaver
    to generate the code for you using the Update Record server
    behavior.
    David Powers, Adobe Community Expert
    Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
    Author, "PHP Solutions" (friends of ED)
    http://foundationphp.com/

  • PHP/MySQL incommunicado since upgrading OS X Server 10.4.2 - 10.4.3

    Back when 10.4 first came out and I foolishly upgraded my server right away, I spent hours trying to reconfigure PHP because Apple had monkeyed with with the configuration (since 10.3) and shipped it such that PHP/MySQL wouldn't speak out of the box. I think the trouble had something to do with the location that PHP looks for MySQL, but low level config of these services isn't really my area of expertise. Eventually I got it fixed, but it was a nightmare trying to figure out what was wrong.
    Sooo....performed the update to 10.4.3 this morning....and now if I try to bring up a php page in a web browser:
    Warning: mysql_pconnect(): Can't connect to MySQL server on '10.0.1.250' (61)...
    And that's as far as it gets. Anyone have any ideas? I would speculate that Apple may have finally addressed the issue that was preventing PHP/MySQL from working out-of-box in 10.4, but, in doing so, my workaround for that problem has now become a problem itself.
    Any advice or help would be of greatly appreciated!

    Make sure mySQL server process is started running.
    I think on some upgrades the setting for automatic start of mySQL
    servcies gets set to NO in /etc/hostconfig file

  • Login failure (cannot modify header) PHP/MySQL

    I have a login form 100% Dreamweaver8 built using PHP/MySQL.
    After logging in it fails to goto the $MM_redirectLoginSuccess page
    (index.php). I did not have this issue prior to the 8.02 update. I
    designed it the same way as I had before the 8.02 update. I have
    checked multiple times for whitespace before and after the PHP open
    and close tags in Dreamweaver and other text editors.
    Below is what info is needed I hope.
    Error
    PHP Warning: Cannot modify header information - headers
    already sent by (output started at /var/www/web4/web/login.php:4)
    in /var/www/web4/web/login.php on line 72, referer:
    Code (All Dreamweaver 8 Generated)
    <?php
    // *** Validate request to login to this site.
    if (!isset($_SESSION)) {
    session_start();
    $loginFormAction = $_SERVER['PHP_SELF'];
    if (isset($_GET['accesscheck'])) {
    $_SESSION['PrevUrl'] = $_GET['accesscheck'];
    if (isset($_POST['username'])) {
    $loginUsername=$_POST['username'];
    $password=$_POST['password'];
    $MM_fldUserAuthorization = "Account_Type";
    $MM_redirectLoginSuccess = "index.php";
    $MM_redirectLoginFailed = "loginfailed.php";
    $MM_redirecttoReferrer = false;
    mysql_select_db($database_dnsturtle, $dnsturtle);
    $LoginRS__query=sprintf("SELECT Email, Password,
    Account_Type FROM accounts WHERE Email=%s AND Password=%s",
    GetSQLValueString($loginUsername, "text"),
    GetSQLValueString($password, "text"));
    $LoginRS = mysql_query($LoginRS__query, $dnsturtle) or
    die(mysql_error());
    $loginFoundUser = mysql_num_rows($LoginRS);
    if ($loginFoundUser) {
    $loginStrGroup = mysql_result($LoginRS,0,'Account_Type');
    //declare two session variables and assign them
    $_SESSION['MM_Username'] = $loginUsername;
    $_SESSION['MM_UserGroup'] = $loginStrGroup;
    if (isset($_SESSION['PrevUrl']) && false) {
    $MM_redirectLoginSuccess = $_SESSION['PrevUrl'];
    header("Location: " . $MM_redirectLoginSuccess );
    --------------------Line 72
    else {
    header("Location: ". $MM_redirectLoginFailed );
    ?>

    I take it you have an include file as well on the page, to
    reference the
    database? Check in there for whitespace.
    Gareth
    http://www.phploginsuite.co.uk/
    PHP Login Suite V2 - 34 Server Behaviors to build a complete
    Login system.

  • PHP/mySQL code help please

    Hi all,
    Thanks to David Powers fab tutorial I am now well on my way to competeing my first dynamique website using PHP/mySQL, (thanks David ), however I am stuck on one particular area....can anyone please help?
    I know that the mySQL database uses the format YYYY/MM/DD for dates, and that is fine. I've sorted out how to display in a more regular format (eg. 1st September 2011) for my application, but I am stuck on how to convert a more regular formatted date entered by the site user into the mySQL format.
    Ideally I would like for the users entry or say either 1/9/11 or 1-9-11 (or something along those lines, to be recognised and displayed on the entry form, but to have a backend function that converts the data to mySQL format. I seem to be reading plenty of forum posts which say this can be done, but unfortunately I can't quite seem to fathom how, or where the code should sit. Would someone mind taking a look at my code page to actually identify what I need to insert, and equally as importantly...where!!!
    Along these lines...is it possible to have a mini-calendar date picker that could be embedded next to the date entry field to ensure that a valid date is entered and in the correct format? Where could this be sourced?
    Thanks in advance of some much needed help
    Mark

    This is becoming really frustrating for me (so god knows how I am to you!!!!), but I usually pick things up so fast and yet this whole PHP/SQL thing is eluding me!!
    I can see (I think) how the code would work, but am struggling to see where it fits into place with my own Dreamweaver 'Update Record' code, as follows. I have spent a couple of days trawling through PHP.net and various other sites and forums before bringing my stupidity to the public domain, but I just can't seem to crack it.
    This one last time then i'll leave you in peace??????
    <?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;
    $editFormAction = $_SERVER['PHP_SELF'];
    if (isset($_SERVER['QUERY_STRING'])) {
      $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
    if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "form1")) {
        $updateSQL = sprintf("UPDATE gig_guide SET `date`=%s, town=%s, venue=%s, private_or_public=%s, start_time=%s WHERE `index`=%s",
                           GetSQLValueString($_POST['date'], "date"),
                           GetSQLValueString($_POST['town'], "text"),
                           GetSQLValueString($_POST['venue'], "text"),
                           GetSQLValueString($_POST['type'], "text"),
                           GetSQLValueString($_POST['start_time'], "text"),
                           GetSQLValueString($_POST['index'], "int"));
      mysql_select_db($database_online, $online);
      $Result1 = mysql_query($updateSQL, $online) or die(mysql_error());
      $updateGoTo = "index.php";
      if (isset($_SERVER['QUERY_STRING'])) {
        $updateGoTo .= (strpos($updateGoTo, '?')) ? "&" : "?";
        $updateGoTo .= $_SERVER['QUERY_STRING'];
      header(sprintf("Location: %s", $updateGoTo));
    $colname_updatePost = "-1";
    if (isset($_GET['index'])) {
      $colname_updatePost = $_GET['index'];

  • PHP / MySQL help

    Hello all,
    I've got an update record form on one of my pages (it is a
    php / MySQL site). I followed the tutorial in dreamweaver 8, it
    works, but it does not work like I want it to work.
    I am hoping that when a user logs into the site, and they
    want to update their information, they can go to a page that has an
    update record form. This form will have all the fields empty. When
    the user enters information, only the fields that have been entered
    will update the record in the database (and all of the fields that
    are left blank will have no effect on the record in the database).
    How it is now, when the user goes to that page, all the text
    fields are filled with the information contained in the database.
    If they make a mistake, and delete any of those fields, that
    information will be deleted from the database.
    Is this possible to do? If so, is there a tutorial that I
    have not found yet that I can learn how to do this?
    Thank you

    >Is this possible to do?
    Sure it's possible, but I don't really think it's necessary.
    What if the user wants to completely remove the contents of the
    field? And if you don't want to allow that, then you should
    validate those fields anyway.
    Another workflow would be to have the form retrieve the
    database row into static text fields, so at least the user can see
    what is stored. Adjacent to the static fields would be normal text
    fields that they can enter text into if they want to make changes.
    Of course your form processing script would then need to evaluate
    each field for contents. It would then dynamically build the update
    sql based on the filled in fields. I don't know of a specific
    tutorial, but if you know sql and php it should be a piece of
    cake.

  • PHP MySQL database

    How to send a number count to the PHP MySQL database everytime a details page is opened from the results page?

    Assuming your DB table named 'stats' has fields for article_id, hits and the article id is passed to the detail page through the URL parameter article_id then your query would look like this:
    mysql_select_db($database_XXXXXX, $XXXXXX);
    if (isset($_GET['article_id'])) {
    $article_id = $_GET['article_id'];
    $query_hits = sprintf("UPDATE stats
    SET hits = hits+1
    WHERE article_id = %s", GetSQLValueString($article_id, "int"));
    $hits = mysql_query($query_hits, $XXXXXX) or die(mysql_error());

  • PHP/MySQL field recognize carriage returns?

    I'm a novice PHP/MySQL database driven site builder. I need
    to have users enter text into a field with carriage returns and
    have the database recognize and store those carriage returns so it
    displays when the data is displayed on a PHP page.
    How do I do this and please keep it simple?
    Do I need to use a particular type of MySQL datafield?
    Will I be able to use the same code on an "update"
    page?

    quote:
    Originally posted by:
    geschenk
    >>
    so it displays when the data is displayed on a PHP page
    >>
    if you just need to replace the \n - type line breaks
    generated by multiline textareas with <br /> on a page, just
    use PHP´s native "nl2br"
    (new line to break) function:
    <?php echo nl2br($row_queryname['field_name']); ?>
    That works... sort of...
    When I use the update page to modify the entry it puts the
    proper "br" code in it's proper place. However when I return to
    that page to edit the text again (as my customer likely will), it
    displays the "br" code in the text field, and if I submit the
    update with the "br" code in place, it duplicates the "br" code
    again, so I get double "br" statements. How do I get the update
    field to read the "br" code back as carriage returns?
    In addition, my insert page uses the following code to write
    the original entry, and I'm not sure where to place the "nl2br"
    statement in the following query (generated by WebAsssist DW
    extensions):
    <?php
    // WA Application Builder Insert
    if (isset($_POST["Insert_x"])) // Trigger
    $WA_connection = $nm_connect;
    $WA_table = "tb_news";
    $WA_sessionName = "WADA_Insert_tb_news";
    $WA_redirectURL = "tb_news_Results.php";
    $WA_keepQueryString = false;
    $WA_indexField = "id";
    $WA_fieldNamesStr =
    "sort|s_head|s_text|head|subhead|bodytext|photoid|photocaption|name|phone|email|linktitle |linkaddress|show_pfm|show_arch|show_cab";
    $WA_fieldValuesStr =
    "".((isset($_POST["sort"]))?$_POST["sort"]:"") ."" . "|" .
    "".((isset($_POST["s_head"]))?$_POST["s_head"]:"") ."" . "|" .
    "".((isset($_POST["s_text"]))?$_POST["s_text"]:"") ."" . "|" .
    "".((isset($_POST["head"]))?$_POST["head"]:"") ."" . "|" .
    "".((isset($_POST["subhead"]))?$_POST["subhead"]:"") ."" . "|" .
    "".((isset($_POST["bodytext"]))?$_POST["bodytext"]:"") ."" . "|" .
    "".((isset($_POST["photoid"]))?$_POST["photoid"]:"") ."" . "|" .
    "".((isset($_POST["photocaption"]))?$_POST["photocaption"]:"") .""
    . "|" . "".((isset($_POST["name"]))?$_POST["name"]:"") ."" . "|" .
    "".((isset($_POST["phone"]))?$_POST["phone"]:"") ."" . "|" .
    "".((isset($_POST["email"]))?$_POST["email"]:"") ."" . "|" .
    "".((isset($_POST["linktitle"]))?$_POST["linktitle"]:"") ."" . "|"
    . "".((isset($_POST["linkaddress"]))?$_POST["linkaddress"]:"") .""
    . "|" . "".((isset($_POST["show_pfm"]))?$_POST["show_pfm"]:"") .""
    . "|" . "".((isset($_POST["show_arch"]))?$_POST["show_arch"]:"")
    ."" . "|" . "".((isset($_POST["show_cab"]))?$_POST["show_cab"]:"")
    $WA_columnTypesStr =
    "none,none,NULL|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''|',n one,''|',none,''|',none,''|',none,''|',none,''|none,none,NULL|none,none,NULL|none,none,NUL L";
    $WA_fieldNames = explode("|", $WA_fieldNamesStr);
    $WA_fieldValues = explode("|", $WA_fieldValuesStr);
    $WA_columns = explode("|", $WA_columnTypesStr);
    $WA_connectionDB = $database_nm_connect;
    mysql_select_db($WA_connectionDB, $WA_connection);
    if (!session_id()) session_start();
    $insertParamsObj =
    WA_AB_generateInsertParams($WA_fieldNames, $WA_columns,
    $WA_fieldValues, -1);
    $WA_Sql = "INSERT INTO " . $WA_table . " (" .
    $insertParamsObj->WA_tableValues . ") VALUES (" .
    $insertParamsObj->WA_dbValues . ")";
    $MM_editCmd = mysql_query($WA_Sql, $WA_connection) or
    die(mysql_error());
    $_SESSION[$WA_sessionName] = mysql_insert_id();
    if ($WA_redirectURL != "") {
    if ($WA_keepQueryString && $WA_redirectURL != ""
    && isset($_SERVER["QUERY_STRING"]) &&
    $_SERVER["QUERY_STRING"] !== "" && sizeof($_POST) > 0) {
    $WA_redirectURL .= ((strpos($WA_redirectURL, '?') ===
    false)?"?":"&").$_SERVER["QUERY_STRING"];
    header("Location: ".$WA_redirectURL);
    ?>

  • Where to go next with Dreamweaver and server-side (php/mysql) applications?

    This question is mainly directed at David Powers but  I appreciate any input from anyone with the same concern or question.
    I've been using DW since the change from Macromedia and have developed a number of applications using built in server behaviors and sb extensions from ADDT, WebAssist, etc. I've learned to customize these behaviors to fit my needs always keeping within the "canned" code. In this way I've "learned" php.
    I own most of David's books and in fact, it was because of these that I have any idea about what I'm doing and went in this direction in my "developer" career (building php/mysql applications using Dreamweaver.)
    With the decision to remove server behaviors (and the other "developer" panels) from DW and with the deprecation of the mysql extension from the php landscape, I'm wondering where to go next? I fully understand this has to happen.
    I'm aware of some alternatives:
    Zend or some other framework - to me, this seems extremely complex
    Keep several versions of DW installed
    Stick to Joomla/WordPress/Drupal - let others who know what they're doing build the architecture
    Actually LEARN php - wish I had time; too much work to do (I know how illogical that sounds but it's a very real situation)
    I know I'm going to have to switch out all that deprecated code or better yet, rebuild the many applications which used the DW (and other) server behaviors. I'm just not sure which way to turn.

    rjjacob wrote:
    Since I wrote this post I concluded that there is no substitute for understanding and have started my re-education by delving further into the issue with updated PHP/MySQL books and tutorials so I can prepare for a Dreamweaver without this functionality.
    Yes, I too have concluded that is the way to go as well. There really is no substitute for learning as much as you can. Whilst the DW Server Behaviours were very convenient they have not kept pace, Adobe prefering to spent their time on less important updates in my opinion. The Server Behaviours are what makes Dreamweaver the tool of choice  for database integration for those who lack the knowledge. I feel the Adobe team will regret not coming up with an alternative. Anything that detracts from making the program what it is is a step in the wrong direction and for sure this is a big step in the wrong direction.
    rjjacob wrote:
    I have mainly used DW server behaviors in my development projects that's why I am curious about what others are doing to make the change. I'm surprised there haven't been more posts; perhaps I'm the last one to be taking action about this, or maybe no one is too worried about it yet.
    I think a lot have changed their working practice but many more are burying their heads in the sand. sql_ support is a way off from being completely dropped yet.
    rjjacob wrote:
    Anyway, your assessment of how terrible the server behaviors are is correct. I'm finding that true after barely breaking the binding on a few books about the greater subject and looking into mysqli and PDO.
    Yes, because I relied heavily on them I did not know how bad they were until I forced myself to look further afield. What you can do in a couple of lines of code the DW Server Behaviors produced quadruple or more to achieve the same.
    rjjacob wrote:
    But they sure were convenient!
    Yes, I agree. Maybe some extention developer will come up with a set of new improved behaviours. I tell you if they do they will make a shed load of money.

Maybe you are looking for

  • How to print vendor #'s on checks

    1. How to print vendor #'s on checks 2. How to print checks alphabetically 3. The Posting Date is printing on checks instead of Invoice date 4. Seperate checks are printing for vendors instead of several invoices on one check. The individual payment

  • I need a software cd for webcam III

    can someone help me with a software cd for a webcam III (creative) PLZZZ :womansad:

  • Missing solutioncenter.msi file for 7210 running windows 7

    Every time I re-boot, I get a prompt that says "can't find SolutionCenter.msi."  HP has a fix here for this BUT... http://h10025.www1.hp.com/ewfrf/wc/softwareDownloadIndex?cc=us&lc=en&softwareitem=mp-77737-1 I did the download, save and run... but it

  • 'Printer offline' error message

    My Epson XP-405 printer is turned on and working normally. But when I send an InDesign document to it I get the false error message 'Printer offline'. Documents created in all my other programs print without problems.

  • Address Book can't synchronize with Exchange server using a domain prefix

    I'm having problems attempting to use Address Book's built in "Synchronize with Exchange" feature. The issue seems to be that my company uses domains with their exchange server, so I login with a username like "domain/user" rather than just "user" iS