PHP MySQL connect error

Ok

I get the following error when running my php pages on our new web server (Windows Server 2003):

Fatal error: Call to undefined function mysql_pconnect() in
c:\Inetpub\wwwroot\jionas_website\Connections\jonas_website.php on line 9

When I open the jonas_website.php file, it says the name of the Connection_php_mysql.htm file. It is on my local machine in the folder programs, but not on the web server. Should it be?

If I run a phpinfo page, it works fine... actually all php commands seem to work.

I also have this "unidentified error" when I try to connect to MYSQL via Dreamweaver MX 2004. I followed all of the suggestions of the technical note for this error. I have yet to get it.

I can connect to MYSQL via MYSQLadministrator server so I don't know what is happening.

Help, please.

Darren

Hung Kuen Kung Fu wrote:
> MYSQL is not listed in the phpinfo page. MMM. don't know how to enable this in the file php.ini so I'll have to look.

Remove the semicolon at the beginning of these lines in windows
extensions section:

; extension = php_mbstring.dll
; extension = php_mysql.dll

Also add this line after them:

extension = php_mysqli.dll

--
David powers
Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
http://foundationphp.com/

Tags: Dreamweaver

Similar Questions

  • PHP/MySQL Parse error: syntax error, unexpected T_VARIABLE the meantime

    I am new to web programming and I'm testing my first PHP/MySQL of HTML data request.

    Already, I get the following error in the analysis:

    Parse error: syntax error, unexpected waiting T_VARIABLE... on line 7.

    Simple code is:

    <? PHP

    $pwd = $_POST ["password"];
    $dbn = $_POST ['database_name'];
    $hnm = $_POST ["hostname"];

    $link_id = mysql_connect ($hnm, $dbn, $pwd);       This is line 7 where I get the error message
    If (isset ($link_id))
    {
    $result = mysql_list_dbs ($link_id);
    echo $result;
    mysql_select_db("hppumps",$link_id);
    $result = mysql_list_tables("hppumps",$link_id);
    echo $result;
    $result = mysql_list_fields ("hppumps", "models");
    echo $result;
    $rows = mysql_affected_rows ($result);
    If ($rows < 1) {echo "error.  Registration has not been added to the database. « ;}
    else {echo "$rows response (s) has been added to the database." ;}}
    }
    on the other
    {
    echo "error.  You were unable to connect to the MySql database";
    }
    ? >

    ANY HELP WITH THIS WOULD BE GREATLY APPRECIATED!

    marcusinfla wrote:

    If it is an exact copy of your code, the problem here and not on the 7 line.

    Do not space between the question mark and the php. The opening PHP tag should look like this:

    		   
  • help with php mysql connect script

    OK guys im new to php mysql and I try inserting form information in my database. IM using a sitepoint script in which I went through the tutorial made some experiences of myself and it worked...

    but now I get this error that I can't understand...

    Command error: you have an error in your syntax SQL; consult the manual corresponding to your version of the server MySQL for the right syntax to use near 'order product SET = ' 1', 'average' = size, color is ", amount = '1' at line 1

    Here is the page
    http://vaughntucker.com/imagecon/hats.php

    and this is the script
    <? PHP
    default page view
    connect to the database
    $dbcnx = @mysql_connect ('p3nl41mysql7.secureserver .net', 'imagecon', ' Dub * boss_1');
    If (! $dbcnx) {}
    echo "< p > unable to connect to the '. 'database server at this time." < /p > ";
    Exit();

    }

    Select database
    If (! @mysql_select_db ('imagecon')) {}
    exit (' < p > cannot locate the ".")
    "database at this time. < /p >");
    }

    MySQL Query add joke
    If (isset($_POST['submit'])) {}
    $product = 1;
    $size = $_POST ["size"];
    $color = $_POST ['color'];
    $quan = $_POST ['quantity'];
    $sql = "INSERT INTO command TOGETHER
    product = "$product."
    size = "$size."
    Color = "$color"
    quantity = "$quan"
    Date = CURDATE () ';
    } else {}
    ECHO 'no data sent ";

    }
    If (@mysql_query ($sql)) {}
    echo "< p > your order has been sent. < /p > ";
    } else {}
    echo ' error < p > order process: '.
    mysql_error(). / '< p > ';
    }



    ? >

    Thanks in advance

    Murray * ACE * has written:
    > $sql = "INSERT INTO command TOGETHER."
    "> product ='". $product. "',
    "> size ='". $size. "',
    "> color ='". $color. "',
    ' > quantity = ' ". $quan. "',

    No, this is not what is causing the problem. It is the use of 'order' as
    the name of the table. The order is an SQL reserved word. Either the name of the table
    should be changed, or the query INSERT rewritten as follows:

    $size = mysql_real_escape_string($_POST['size']);
    $color = mysql_real_escape_string($_POST['color']);
    $quan = mysql_real_escape_string($_POST['quantity']);
    $sql = 'INSERT INTO 'order' SET
    product = 1,.
    size = "$size."
    Color = "$color"
    quantity = $quan,
    'date' = CURDATE () ';

    Note that I surrounded order and date with backticks. I also have
    $product, was deleted because it has a fixed value. I removed the quotes from
    around $quan, because the numbers should not be quoted in SQL queries.

    The changes I did assume that magic quotes are disabled the
    Server. If they are on, you must also pass the variables $_POST
    stripslashes() like this:

    $size = mysql_real_escape_string (stripslashes($_POST['size']));
    $color = mysql_real_escape_string (stripslashes($_POST['color']));
    $quan = mysql_real_escape_string (stripslashes($_POST['quantity']);

    --
    Adobe Community Expert David Powers
    Author, "The Essential Guide to Dreamweaver CS4",
    "PHP Solutions" & "PHP Object-Oriented Solutions.
    http://foundationphp.com/

  • Oracle PHP PDO connection error

    Hello everyone,

    I am trying to connect to Oracle with my php application but I get the following error
    "php startup: unable to load dynamic library 'c:/wamp/bin/php/php5.3.13/ext/php_pdo_oci8.dll' - %1 is not a valid Win32 application".

    My system is Windows 7 Professional 64 bit and I installed Oracle 11 g Express edition.

    Note that it worked before but I had to format my hard drive, so I had to reinstall.

    Any help will be appreciated

    Mike

    Do you have the 32-bit WAMP? Oracle XE 11 g on Windows is 32-bit.

    Did reboot you after installng so this path contains the Oracle libraries?

    (A general note to everyone: use OCI8 PDO_OCI preference.) In fact, use mysqli PDO_MYSQL preference also)

  • MySQL connection error

    Hello

    I'm new to labview and database programming. I am trying to recover data from mysql database and show it on labview. I get an error message and I don't know how to fix it.

    Please advice kindly. Thank you.

    FOR INFO:

    I use:

    32-bit labview 2012 and

    64-bit ODBC connector

    If you use 32-bit LabVIEW, you must use the 32-bit ODBC connector.

    Install the 32-bit connector and then run the 32-bit version of ODBC (c:\Windows\SysWOW64\odbcad32.exe) administration tool and configure your connection from there.

  • Unable to connect error 404 PHP/MySQL

    Wow, the learning curve is killing me. Yet another challenge. I use Dreamweaver CC and this tutorial http://www.adobe.com/devnet/dreamweaver/articles/setup_php.html

    I'm at this stage:

    1. Open comments.php . You must have a PHP page open in the Document window to create a MySQL connection.
    2. In the databases Panel (choose window > databases), click on the sign located on the Panel and select MySQL Connection.The MySQL connection dialog box appears.
    3. Type connTest as login name.
    4. For the MySQL server, type localhost. If you use MAMP ports by default on a Mac, use localhost:8889.
    5. For the user name, type phptestuser.
    6. Type the password that you chose for the phptestuser account in the password field.
    7. To the database, type php_test. Note: You need not precede the underscore with a backslash character here. It was inserted by phpMyAdmin in the previous section (see Figure 20) only because phpMyAdmin uses a query which allows wildcards.
    8. Click on Test.Dreamweaver tries to connect to the database. If the connection fails, follow these steps:
      • Check the server name, user name, and password.
      • Check the settings in the file that Dreamweaver uses to process dynamic pages (see specification of a Dreamweaver testing server).
      • Ensure that the web and MySQL server are both running.
      • Temporarily disable any firewall or security program. If the connection works, you must configure the security program to allow communication between Dreamweaver and MySQL.
    9. Click OK. The new connection appears in the data Panel.
    10. Expand connTest connection, and then expand the Tables branch. You will see the comments table in the database, you can expand to reveal the details of the columns in the table (see Figure 23).

    I can say that I followed this tutorial to the letter.

    As far as I know, XAMPP/php mySQL all running very well, the files are in the right place and everything should work. However when I type test, I get a 404 error. (Same error when I hit the select button).

    The problems on the 404 message are:

    1. There is no server running on the server test.

    Sure the testing server is running. Is there a way to test this, another that note that xampp is certainly running right now and I can connect to phpMYadmin without problem?

    2 test specified for this site server is not mapped with the http://localhost/php_test/_MMServerScripts/MMHTTPDB.php URL check that the URL prefix maps to the root of the site.

    UH... I'm sure that I put things where I was told to put them in the tutorial, but I'm lost right now where I should check that. A clue here? The files are where they are supposed to be, but maybe I entered something wrong? Except... I don't know what it might be or where to find it. Whatever IT is.

    Everything in the local files is fine.

    Thanks for your help!

    PS: Extra points to anyone who figures how to make copy/pasteable error messages! These guys are the bane of my life!

    Stop and restart the services he. Stop Xampp if still the same behavior. It should look like as below

  • PHP/MySql error message

    I posted this before and didn't get the answer I need, probably because I didn't post all my codes. I use PHP/MySql.  I created a Web site that has several forms.  When I conducted three of the forms, I get the below error messages:

    You have an error in your SQL syntax; consult the manual for your version of the MySQL server for the right syntax to use near ' condition, length, color, city, 'State', Email, Photo) VALUES ('29 ', ' 4',' used "in line 1.)

    I write the codes below.  I hope this time that I posted everything I should have so that I can get help.

    FORM

    < form action = "<?" PHP echo $editFormAction;? ">" method = "POST" enctype = "multipart/form-data" name = "individual" class = 'individual' id 'individual' = >
    < table width = "594" border = "0" class = "test" >
    < tr > < /tr >
    < b >
    < td width = "166" class = 'td' > view < table > title
    < td colspan = "3" > < span id = "sprytextfield1" >
    < label >
    < input name = "Display title" type = "text" class = "test" id = "Display title" size = "35" / >
    < / label >
    < span class = "textfieldRequiredMsg" > required </span > < / span > < table >
    < /tr >
    < b >
    < td = 'td' class > price < table >
    < td colspan = "3" > < span id = "sprytextfield2" >
    < label >
    < input name = "price" type = "text" class = 'test' id = 'price' size = '35' / >
    < / label >
    < span class = "textfieldInvalidFormatMsg" > Invalid format. </span > < / span > < table >
    < /tr >
    < b >
    < class td = 'td' > < table > format
    < td colspan = "3" > < label >
    < select name = "size" = "1" multiple = "multiple" class = 'test' id = 'size' >
    < option > 0 < / option >
    < option > 2 < / option >
    < option > 4 < / option >
    < option > 6 < / option >
    < option > 8 < / option >
    < option > 10 < / option >
    < option > 12 < / option >
    < option > 14 < / option >
    < option > 16 < / option >
    < option > 18 < / option >
    < option > 20 < / option >
    < option > 22 < / option >
    < option > 24 < / option >
    < option > 26 < / option >
    < / select >
    < / label > < table >
    < /tr >
    < b >
    < class td 'td' = > status < table >
    < td colspan = "3" > < label >
    < select name = "Condition" class = 'test' id = 'State' >
    < option > new < / option >
    < option > used < / option >
    < / select >
    < / label > < table >
    < /tr >
    < b >
    < class td 'td' = > length < table >
    < td colspan = "3" > < label >
    < select name = "Length" class = 'test' id = 'Length' >
    Long < option > < / option >
    Short < option > < / option >
    < option > mid-length < / option >
    < / select >
    < / label > < table >
    < /tr >
    < b >
    < class td 'td' = > color < table >
    < td colspan = "3" class = 'td' > < span id = "sprytextfield5" >
    < label >
    < input name = "Color" type = "text" class = "test" id = "Color" size = "35" / >
    < / label >
    < span class = "textfieldRequiredMsg" > required </span > < / span > < table >
    < /tr >
    < b >
    < class td 'td' = > city < table >
    < class td = 'td' > < span id = "sprytextfield4" >
    < label >
    < input name = "City" type = "text" class = 'test' id = 'City' size = "35" / >
    < / label >
    < span class = "textfieldRequiredMsg" > required </span > < / span > < table >
    < class td = 'td' > < table >
    < class td = 'td' > < table >
    < /tr >
    < b >
    < class td 'td' = > status < table >
    < td colspan = "3" > < label >
    < select name = "State" class = 'test' id = 'State' >
    < option > AL < / option >
    < option > AK < / option >
    < option > AZ < / option >
    < option > AR < / option >
    < option > CA < / option >
    < option > CO < / option >
    < option > CT < / option >
    < option > OF < / option >
    < option > DC < / option >
    < option > FL < / option >
    < option > GA < / option >
    < option > HI < / option >
    ID < option > < / option >
    < option > HE < / option >
    IN < option > < / option >
    < option > HERE < / option >
    < option > KS < / option >
    < option > KY < / option >
    < option > THE < / option >
    < option > ME < / option >
    < option > MD < / option >
    < option > MY < / option >
    < option > e < / option >
    < option > MN < / option >
    < option > MS < / option >
    < option > MO < / option >
    < option > MT < / option >
    < option > NOT < / option >
    < option > NV < / option >
    < option > NH < / option >
    < option > NJ < / option >
    < option > NM < / option >
    < option > NY < / option >
    < option > NC < / option >
    < option > ND < / option >
    < option > OH < / option >
    < option > OK < / option >
    < option > OR < / option >
    < option > PA < / option >
    < option > LAUGHED < / option >
    < option > SC < / option >
    < option > SD < / option >
    < option > TN < / option >
    < option > TX < / option >
    < option > c < / option >
    < option > VT < / option >
    < OPTION > < / option >
    < option > WA < / option >
    < option > WV < / option >
    < option > WI < / option >
    < option > WY < / option >
    < / select >
    < / label > < table >
    < /tr >
    < b >
    < class td 'td' = > Email < table >
    < td colspan = "3" > < span id = "sprytextfield3" >
    < label >
    < input name = "Email" type = "text" class = "test" id = "Email" size = "35" / >
    < / label >
    < span class = "textfieldRequiredMsg" > required </span > < span class = "textfieldInvalidFormatMsg" > Invalid format. </span > < / span > < table >
    < /tr >
    < b >
    < height = "26" td class = 'td' > confirm Email < table >
    < td colspan = "3" > < span id = "spryconfirm1" >
    < label >
    < input name = "Confirm Email2" type = "text" class = 'test' id = 'confirm Email2"size ="35"/ >
    < / label >
    < span class = "confirmRequiredMsg" > required </span > < span class = "confirmInvalidMsg" > the values don't match. </span > < / span > < table >
    < /tr >
    < b >
    < height td = '26' class = 'td' > photo (s) < table >
    < td colspan = "3" > < label >
    < input name = "Photo" type = 'file' class = 'test' id = 'Photo' size = "35" / >
    < / label > < table >
    < /tr >
    < b >
    < height = '131' td class = 'td' > < table > Details
    < td colspan = "3" > < label >
    < textarea = cols "Additional Details" name = "40" lines "6" = class = 'test' id = "Détails" > < / textarea >
    < / label > < table >
    < /tr >
    < /table >
    < p >
    < label >
    < input name = "Submit" type = 'submit' class = 'test' id = "Submit" value = "Post" / >
    < / label >
    < /p >
    < input type = "hidden" name = "MM_insert" value = "individual" / >
    < / make >

    SERVER BEHAVIOR


    If (! function_exists ("GetSQLValueString")) {}
    function GetSQLValueString ($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
    {
    If (via 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 "set":
    $theValue = ($theValue! = "")? $theDefinedValue: $theNotDefinedValue;
    break;
    }
    Return $theValue;
    }
    }

    $editFormAction = $_SERVER ['PHP_SELF'];
    If (isset {}
    $editFormAction. = « ? ». htmlentities($_SERVER['QUERY_STRING']);
    }

    If ((isset($_POST["MM_insert"])) & & ($_POST ["MM_insert"] == "individual")) {}
    $insertSQL = sprintf ("INSERT INTO donations (postingTitle, 'size', condition, length, color, city, 'State', email, photo) VALUES (%s, %s %s, %s, %s, %s, %s, %s, %s)", ")
    GetSQLValueString ($_POST ["'validation title"], "text").
    GetSQLValueString ($_POST ['size'], "text").
    GetSQLValueString ($_POST ["State"], "text").
    GetSQLValueString ($_POST ['Length'], "text").
    GetSQLValueString ($_POST ['Color'], "text").
    GetSQLValueString ($_POST ['city'], "text").
    GetSQLValueString ($_POST ["State"], "text").
    GetSQLValueString ($_POST ['Email'], "text").
    GetSQLValueString ($_POST ['Photo'], "text"));

    @mysql_select_db ($database_bridesmaidsrack_db, $bridesmaidsrack_db);
    $Result1 = mysql_query ($insertSQL, $bridesmaidsrack_db) or die (mysql_error ());

    $insertGoTo = "donations.php";
    If (isset {}
    $insertGoTo. = (strpos ($insertGoTo, '?'))? « & » : « ? » ;
    $insertGoTo. = $_SERVER ['QUERY_STRING'];
    }
    header (sprintf ("location: %s", $insertGoTo));
    }

    CONNECTION TO THE BASE


    # FileName = "Connection_php_mysql.htm"
    # Type = 'MYSQL '.
    # HTTP = 'true '.
    $hostname_bridesmaidsrack_db = "localhost";
    $database_bridesmaidsrack_db = "bridesmaidsrack";
    $username_bridesmaidsrack_db = "";
    $password_bridesmaidsrack_db = "";
    $bridesmaidsrack_db = mysql_pconnect ($hostname_bridesmaidsrack_db, $username_bridesmaidsrack_db, $password_bridesmaidsrack_db) or trigger_error (mysql_error (), E_USER_ERROR);

    OK, so your initial problem was the condition of the word, because it is a reserved word for MySQL.

    Here is a list of the reserved words.

    http://dev.MySQL.com/doc/refman/5.1/en/reserved-words.html

    If you use a reserved word, you must place the accents around it like this...

    "condition."

    then MySQL knows you use it as a standard Word and he interprets not as command.

    OK now on the following problem.

    'Photo' column cannot be null

    When you have created your table in MySQL tells you that the photo field can not be empty. If you are forcing people to add a photo, then you need to do the checked field before the script runs / inserts. If you're ok with them NOT to add a photo, then you have to allow NULL values for this field in your table. This is a function that you would normally control via PHP MyAdmin or other MySQL database management software.

    Now, the last question:

    The Dynamic (form.action...) attribute is just how the FIELD itself will appear in SB (Server Behaivors) who is not the insertion of a plug.

    Record insertion as I said probably disappeared because some how you two when you shouldn't have one. So when we removed a DW (Dreamweaver) now think his party but is not. This can sometimes be corrected by opening the page again and closing or manually set or remove all SB side code, and then add the insertion of a plug anywhere. But at least you know what was the original problem so you can fix it after add it again.

  • PHP and MySQL Connection problem

    I'm doing a PHP MySQL on a connection to the remote server in Dreamwesaver CS3.

    When I enter the information (host, user, password, etc.) and hit TEST, I get the following error message.

    "Access is denied. The file exists may not, or there could be a permission problem. Make sure you have permission on the server and the server is properly configured. »

    I know how to work the user, password, etc., I can access the MySQL database with other software.

    I checked with my host and they say that there is no permission problem on their end.

    I checked the settings on the Test Server page in the configuration of a Site and everything looks correct and works there.

    I've seen this particular problem described in other messages of the forum (even if there are a LOT of comments on this topic!).

    Any help would be appreciated.

    pabirds, I had the same problem. Here's the solution that worked for me:

    1. make sure that you have clicked on the tab Advanced in the Definition of Site pane, and then

    2. Select testing serverin the list on the left side of the pane, and then

    3. set Host FTP on host your site, your e.g. ftp.yoursite.com or ftp.yoursite.eu, then

    4. set the host directory according to the hierarchy of your hosting service, it will probably be something like: areas / www / htdocs or /. To determine this, when you have window Dreamweaver files open in two columns, expand the root of your site. Then

    5. set your prefix on the URL of the root of your site, then your example http://www.yoursite.com/ or http://www.yoursite.eu/,

    6. use your connection user/pass combination.

    I my case, step 4 has been the cause of my sudden increase in gray hair and elevation of blood pressure.

    hope this helps.

    speedingyeti

  • mod_rewrite mysql connection breaks

    It was recommended to me that I repost cela in this forum instead of the forum discussions general DW.

    The following .htaccess file is break my mysql connection in DW CS3 amd CS5.5. I've isolated the rewrite rule which passes two parameters to index.php as the cause of the problem, but I don't seem to be able to exclude the directory of links of the rewrite rule without breaking the behavior of the web site that the htaccess file works very well with the site.

    Options + FollowSymLinks
    RewriteEngine on
    RewriteRule ^(assets|) Connections | CSS | docs | images | Inc. | include | menus | modules | module s_shared: js)($|/) - [L]
    RewriteRule ^ ([^ /] *) / ([^ /] *) /? $ index.php? webpage = $1 & article = $2 [L, QSA, NC]
    RewriteRule ^ ([^ /] *) /? index.php? webpage = $1 $ [NC, QSA, L]

    Here is the same code with a few explanations

    Options + FollowSymLinks
    RewriteEngine on

    # The next line should be out of the directory of links. It works in the browser when I go directly to the login script
    RewriteRule ^(Connections|css|docs|images|inc|include|menus|modules) ($| /)-[L]

    #The below line passes the page and a second parameter. This is what breaks the DB connection!
    RewriteRule ^ ([^ /] *) / ([^ /] *) /? $ index.php? webpage = $1 & article = $2 [L, QSA, NC]
    #The line below is for pages that do not require an extra parameter and does NOT break the db connection in DW
    RewriteRule ^ ([^ /] *) /? index.php? webpage = $1 $ [NC, QSA, L]

    Someone can help me to get a mod_rewrite htaccess file that accomplishes what we do it but does not break my connection to mysql DW? With this in place .htaccess file, I receive data = > Tables = > None, and if I try to test the connection, I get an error not identified, BUT the web site works.

    P. S.

    I also tried assourted as rewrite conditions

    RewriteCond% {REQUEST_URI}! /Connections/*.$

    without a bit of luck.

    When I delete the second last line, the DB connection works. I tried a number of bugs, but not joy.

    SOLVED!

    Nobody seemed to have an answer for the past two years, but I found an answer today.

    INCLUDE _mmServerScripts in the list of EXCLUDED directories

    RewriteRule ^(assets|) Connections | CSS | docs | images | Inc. | include | menus | modules | s_shared module | JS | ( _mmServerScripts) ($|/) - [L]

    Refresh and it works.

  • Insert a special character such as apostrophes with PHP/Mysql

    Hi friends,

    I have a problem with php/mysql. I created a form vach'inton a page php with dreamweaver and when I try to fill in the form with a string that contains an apostrophe ('), I got an error. It seems that integration is not possible. Would you have any idea for that. I give you the code of dreamweaver php and thank you for your help.

    <? php require_once('Connections/Mainconnect.php');? >

    <? php require_once('Zend/Date.php');? >

    <? PHP

    If (! function_exists ("GetSQLValueString")) {}

    function GetSQLValueString ($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")

    {

    If (via 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":

    If ($theValue =="")

    {

    $theValue = "NULL";

    }

    on the other

    {

    $zendDate = new Zend_Date($theValue,"dd/MM/yyyy");

    $theValue = "" "." $zendDate-> toString("yyyy-MM-dd"). »" « ;"

    }

    break;

    case "set":

    $theValue = ($theValue! = "")? $theDefinedValue: $theNotDefinedValue;

    break;

    }

    Return $theValue;

    }

    }

    $editFormAction = $_SERVER ['PHP_SELF'];

    If (isset {}

    $editFormAction. = « ? ». htmlentities($_SERVER['QUERY_STRING']);

    }

    If ((isset($_POST["MM_update"])) & & ($_POST ["MM_update"] == "form1")) {}

    $updateSQL = sprintf ("UPDATE pers_soc_reg SET Field1 = %s, Field2 = %s,

    GetSQLValueString ($_POST ["field1"], "text").

    GetSQLValueString ($_POST ["Field2"], "double"));

    Hello friends,

    I solved the problem.

    The problem is a free extension for dreamweaver called 'check new items' of Felixone. After his retirement, all forms of work without problem.

    Thanks to you all.

  • mod_rewrite mysql connection break

    The following .htaccess file is break my mysql connection in DW CS3. I've isolated the rewrite rule which passes two parameters to index.php as the cause of the problem, but I don't seem to be able to exclude the directory of links of the rewrite rule without breaking the behavior of the web site that the htaccess file works very well with the site.

    Options + FollowSymLinks
    RewriteEngine on
    RewriteRule ^(assets|) Connections | CSS: docs | pictures | Inc: include | menu | modules | modules_shared |)($|/) - [L] js
    RewriteRule ^ ([^ /] *) / ([^ /] *) /? $ index.php? webpage = $1 & article = $2 [L, QSA, NC]
    RewriteRule ^ ([^ /] *) /? index.php? webpage = $1 $ [NC, QSA, L]

    Here is the same code with a few explanations

    Options + FollowSymLinks
    RewriteEngine on

    # The next line should be out of the directory of links. It works in the browser when I go directly to the login script
    RewriteRule ^(Connections|css|docs|images|inc|include|menus|modules) ($| /)-[L]

    #The below line passes the page and a second parameter. This is what breaks the DB connection!
    RewriteRule ^ ([^ /] *) / ([^ /] *) /? $ index.php? webpage = $1 & article = $2 [L, QSA, NC]
    #The line below is for pages that do not require an extra parameter and does NOT break the db connection in DW
    RewriteRule ^ ([^ /] *) /? index.php? webpage = $1 $ [NC, QSA, L]

    Someone can help me to get a mod_rewrite htaccess file that accomplishes what we do it but does not break my connection to mysql DW CS3? With this in place .htaccess file, I receive data = > Tables = > None, and if I try to test the connection, I get an error not identified, BUT the web site works.

    When I delete the second last line, the DB connection works. I tried a number of bugs, but not joy.

    SOLVED!

    Nobody seemed to have an answer for the past two years, but I found an answer today.

    INCLUDE _mmServerScripts in the list of EXCLUDED directories

    ewriteRule ^(assets|) Connections | CSS | docs | images | Inc. | include | menus | modules | module s_shared: js | _mmServerScripts)($|/) - [L]

    Refresh and it works.

  • How can I get the data in the foreign key?  PHP/mysql

    I managed to create registration, log-in and results pages appear for accounts of client with PHP/Mysql/Dreamweaver 8. I have another page for more information to be contained in a child table, I used the Insert Wizard to create. I can't make it work. I get either a foreign key cannot be null error or a foreign key constraint.

    If I include the foreign key in the form on the page, I can manually enter the appropriate identification number, and it works. How to automatically enter the id into the foreign key column?

    I got the authentication of users using e-mail, password and user type.

    Thanks for your help

    When someone connects, Dreamweaver creates a session variable called $_SESSION ['MM_Username"]. Use this session variable to create a recordset object to get the ID of the user, who can then be entered in the child table's foreign key field.

    Dreamweaver automatically updates the code for recordsets immediately above the DOCTYPE declaration, then you will need to move above the code for the server behavior insert record. So it must be in the following order:

    1. Recordset to get the user ID
    2. Insert the record to the child table
  • MySQL connection does not work

    I created a php file. I also created a database with a username and password in phpMyadmin on my remote Web server. I used Dreamweaver "Manage Sites" to set up distance information and the testing server. These work well. However, when I try to set up the MySQL and test the connection, I get the message error "an unidentified error has occurred." I have many calls using the Web server and they say that I have everything set up very well. However, I still get the same error message. I have spent hours trying to solve this problem and would be very grateful for any help.

    I finally got the MySQL connection to operate. After a lot of changes for different settings, I discovered tonight that I had a spelling error in the prefix field of the URL to the testing server.

  • I need some tutorials Ajax, PHP, Mysqli?

    Hello world

    I need tutorials on the following

    (1) I have a div that is connected to a database, it displays information x I want to do a picture-button that refreshes this div in a click.

    (2) I have 3 different pictures (thumbnails) on a page that each represents its own category of pictures, I want each image to do ' when one of the 3 images is presset, there should be a fade by displaying images (10, etc.) associated with this category (perhaps of an include statement?). under the 3 photos, if you press one of the 3 images current images in the 3 images has to falter and new photos (22 photos etc.) melted, does make sense? .

    If anyone has some good tutorials that is not impossible to understand due to the mic/accent, I'd be more than happy!

    OMFG... I just think that I found the magic for the first jewel, if someone need to solve one that I found this

    http://StackOverflow.com/questions/17438243/AJAX-update-div-tag-on-button-click

    N ° 1)

    "I just removed the"setTimeout('Ajax()',2000);" both places.

    Step 2)
    Made the small script php/mysqli one inclusion

    Step 3)

    Changed to this-->> >xmlHttp.open("GET","refresh.php",true);
    xmlHttp.send(null);<<<-- to this -->>

    xmlHttp.open("GET","Includes/frontpage/featured.php",true);

    xmlHttp.send (null);<>

    Step 4)

    Added this onclick = "Ajax (); "to my tag

  • PHP/MySQL relational database

    Hello

    I'm pretty new to php/MySQL. I'm stuck on how to make a cross-connection database.

    I have two tables 'users' and 'comments' and wants to set up a page that a user can see and edit the comments they made.

    So far, I tried to do an advanced Recordset, but all I managed to do is to display all records that share a user_id.

    I use dreamweaver CS5.5 and PHP and MySQL.

    Thanks in advance for your help

    Eddie

    This should be just a base query SELECT * FROM {comment-tbl} WHERE userid = $_SESSION ['user'].

    Do you use Cookies or Sessions at this point or you're simply trying to write this in a query without them?

Maybe you are looking for