Really boring new php MySQL error

Hi guys.

This is a new error. My dynamic page works fine since 2 weeks until today. I have a php page with 2 sets of records and two div that shows the records of their own. Previously, I had a recordset with a repeat region that showed all the records. My second showed only 3 files. It worked very well.

Now, I realized that in some cases, the first recordset would be or can have quite a few records, more ID to display simultaneously in my div (its pretty narrow, so does the page really long, also was not very readable files more say 5). So I decided to change the repeat region to display 5 records at a time and add an element of navigation so that the user could browse the recordset object and the div not stretching too much.

I did it and it worked fine on my local test machine. I downloaded the file changed on the remote server and got this error when I looked at the page: mysql_num_rows(): supplied argument is not a valid MySQL result resource in [file path] on line [which included the 1st instance of the mysqlnumrows()]

I tried dismantling the changes I did, but still get the error. So I deleted ALL the php page and started from scratch to try to find this point wherer has stopped working. The following code example is where I was up to when the error is its ugly resurgence again.

Sorry for the long message. I hope that much can you help, you can normally! Thanks in advance.

Dave

OK now I feel kinda stupid...

It was down to my login script: how Dreamweaver (again!) automatically using pconnect() to connect to a database and my host has disabled. Quick change to connect() and download the login script and everything is fine. I don't see why it was changed, but because I do not change the connection. Well. Still does not explain the error messages, but removes them.

Tags: Dreamweaver

Similar Questions

  • 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.

  • 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 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:

    		   
  • How can I turn off the error 'no internet connection '? I am on wireless and my internet connection is often intermittent.  This popup is really boring.

    How can I turn off the error 'no internet connection '? I am on wireless and my internet connection is often intermittent.  This popup is really boring.

    Thank you

    you have to start the application of office cc, at most, once every 30 days.  and if you have an annual subscription, simply start it once all the 91 days.

    so, in your cc preferences, uncheck "Start on login" and close it.

  • ActionScript 3 + PHP: TypeError: Error #2007: text parameter must be non-null.

    HI - still new to flash as3 and php.

    This is a page of contact form - user highlights information - I'm to receive their information to an e-mail address

    so the get variables sent from php to the .swf file.

    I got these errors and not knowing how to fix them.

    any help would be appreciated. Thank you in advance, really.

    Here are the errors in flash - as3 - and configuration of php code code.

    errors:

    ActionScript 3 + PHP: TypeError: Error #2007: text parameter must be non-null:

    to flash. text::TextField / set text()

    at kwangjaekim_fla::wholeform_16/completeHandler()

    at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()

    at flash.events::EventDispatcher/dispatchEvent()

    at flash.net::URLLoader/flash.net:URLLoader::onComplete()

    My as3 code is the following:

    construct the name of the variable for the loader Variables URLS

    var variables: URLVariables = new URLVariables();

    Build the varSend variable

    var varSend:URLRequest = new URLRequest ("contact_parse.php");

    varSend.method = URLRequestMethod.POST;

    variable = varSend.data;

    Build the varLoader variable

    var varLoader:URLLoader = new URLLoader;

    varLoader.dataFormat = pouvez;

    varLoader.addEventListener (Event.COMPLETE, completeHandler);

    Manager for the realization of PHP script and the return of the status

    function completeHandler(event:Event):void {}

    value is cleared to «»

    name_txt. Text = "";

    contact_txt. Text = "";

    msg_txt. Text = "";

    Load the PHP here answer

    status_txt. Text = event.target.data.return_msg;

    }

    Add the submit button click event listener

    submit_btn.addEventListener (MouseEvent.CLICK, ValidateAndSend);

    function ValidateAndSend

    function ValidateAndSend(event:MouseEvent):void {}

    field validation

    {if(!name_txt.) Length)}

    status_txt. Text = "Please enter your name";

    } else {if(!contact_txt.length)

    status_txt. Text = "Please enter your Contact details";

    } else {if(!msg_txt.length)

    status_txt. Text = "Please enter your Message";

    } else {}

    loan form for sending variables

    variables.userName = name_txt.text;

    variables.userContact = contact_txt.text;

    variables.userMsg = msg_txt.text;

    Send data to PHP now

    varLoader.load (varSend);

    submit_btn.addEventListener (MouseEvent.CLICK, function() {MovieClip (parent) .gotoAndPlay (151)});

    } / / Close another condition to handle errors

    } / / Close accept and send service

    my php code is:

    <? PHP

    Create local variables of PHP from the info the user given in the form of Flash

    $senderName = $_POST ['userName'];

    $senderEmail = $_POST ['userContact'];

    $senderMessage = $_POST ['userMsg"];

    Strip slashes on local variables

    $senderName = stripslashes ($senderName);

    $senderContact = stripslashes ($senderContact);

    $senderMessage = stripslashes ($senderMessage);

    //!!!!!!!!!!!!!!!!!!!!!!!!!     change this to my email address!

    $to = "put iny me email address ';

    Put the Email address of the sender here

    $from = "$senderContact";

    $subject = "your site contact";

    Start the HTML e-mail Message

    $message = < < < EOF

    < html >

    < body bgcolor = "#FFFFFF" >

    < b > name < /b > = $senderName < br / > < br / >

    < b > Contact < /b > = < a href = "mailto:$senderContact" > $senderEmail < /a > < br / > < br / >

    < b > < /b > Message = $senderMessage < br / >

    < / body >

    < / html >

    EXPRESSIONS OF FOLKLORE;

    end of message

    $headers = "from: $from\r\n;

    $headers. = "content-type: text/html\r\n";

    $to = "$to";

    mail ($ $subject, $message, $headers);

    Exit();

    ? >

    Thank you once again

    Jay

    As I said, the PHP is not the value you are trying to assign to the text property of the textfield status_txt.  If you try to assign an undefined value.  Somewhere in your PHP, you do an echo of this value...

    echo "return_msg is whatever the message ';.

  • 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.

  • AS3 / PHP / MySQL - login form

    Hello

    I am creating the simplest example I can an AS3/PHP/MySQL interaction.  I want a Flash animation to check login/pass a user against a database.  I tested the PHP code and know that it is correct.  The problem must lie in his.  I traced everything to make sure that it shuts down correctly, but it is up under the names of variable $user, $passer... and some of the other garbage... not the values of the variables I wait... see below.

    The PHP code returns correctly what follows when tested in the browser: user = dan & pass = danpass & err = success!

    The variable traces $user, $pass, $err return the following Flash:

    undefined

    $pass

    $err ';


    echo $returnString;


    }


    ? >

    The following ActionScript code:

    import flash.events. *;

    import flash.net.URLLoader;

    import flash.net.URLRequest;

    import flash.net.URLVariables;

    import flash.net.URLRequestMethod;

    logbtn.addEventListener (MouseEvent.CLICK, login)

    function login ($e:MouseEvent) {}

    var myVariables:URLVariables = new URLVariables();

    var myRequest:URLRequest = new URLRequest ("login.php");

    myRequest.method = URLRequestMethod.POST;

    myRequest.data = myVariables;

    var myLoader:URLLoader = new URLLoader;

    myLoader.dataFormat = pouvez;

    myLoader.addEventListener (Event.COMPLETE, completeHandler);

    myVariables.user = loguser.text;

    myVariables.pass = logpass.text;

    myLoader.load (myRequest);

    function completeHandler(event:Event):void {}

    trace (Event.Target.Data.User);

    trace (Event.Target.Data.Pass);

    trace (Event.Target.Data.Err);

    }

    }

    And here is the PHP:

    <? PHP

    include_once "dbconnect.php";

    $user = $_POST ['user'];

    $pass = $_POST ['pass'];

    $sql = mysql_query ("SELECT * FROM users WHERE user = ' $user ' AND pass = '$pass'");

    $check = mysql_num_rows ($sql);

    If ($check > 0) {}

    $row = mysql_fetch_array ($sql);

    $user is $row ['user'];.

    $pass is $row ['pass'];.

    $err = ' Success! ';

    $returnString = "user = $user & pass = $pass & err = $err;

    echo $returnString;

    }

    ? >

    Nothing stands out as incorrect?  I went on that for probably 10 or 15 hours trying different variations, tweaks and reduce complexity.  Really, I'd appreciate any help you can offer!  Thank you.

    -Eric

    Hello

    you load the php file in the same folder, or localhost (running the SWF in a browser)?

    If being run from localhost, your system could deliver rather than run php scripts

  • help Beginner Dreamweaver - php &amp; mysql

    Jin

    New in dremweaver, have used .net in the past with von Willebrand disease and found straight forward to drag on the grid of visualization etc. to display data from sql database.

    I now want to use php and mysql, and watching dreameaver cs4 I really want to know what is each navigation. say how to create my database mysql and drag a grid view in dreamweaver cs4 above to see?

    basically just need to know the basics navigation what buttons I need to interact using php and mysql?

    any help would be very well and also if anyone can recommend a good book on php/mysql with dreamweaver cs4 as one by him then would be very happy.

    Thank you very much

    Andy

    This could be a good starting point:

    http://help.Adobe.com/en_US/Dreamweaver/10.0_Using/WScbb6b82af5544594822510a94ae8d65-7fc8a .html

  • 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/

  • 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?

  • Unknown column in the PHP/MySQL field list

    I created a feedback form for our airshow site and it works great. I now create some pages of the review, which are also working well, then

    ... I decided to improve one of the review pages and now it does not work... sigh.

    We ask stakeholders to provide their zip code and I have a vision showing the number of responses by postcode, this works very well and can be seen here http://www.hollisterairshow.com/feedback-results.php , so I decided to improve it by adding the City / State based on zip code. I created a new table called 'postcodes' and imported a list of zip codes and city / state info - all the 42,000 + of them.

    The PHP/MySQL, who works is illustrated below

    <? PHP
    Connect MySQL

    $query = "SELECT zip, COUNT (zip) ZIP GROUP BY feedback";

    $result = mysql_query ($query) or die (mysql_error ());

    Print results
    While ($row = {mysql_fetch_array ($result))}
    echo $row ["zip"]. " ". $row ['COUNT (zip)'];
    echo "< br / > ';
    }
    ? >

    As I am now faced with two tables, I thought that I had to add the name of the table in any field, so I added the names of tables and fields to the new table so

    I changed the PHP / MySQL as follows

    <? PHP
    Connect MySQL

    $query = 'SELECT feedback.zip, COUNT (feedback.zip), zipcodes.citystate OF feedback codes postal WHERE feedback.zip = zipcodes.zipcode GROUP BY feedback.zip';

    $result = mysql_query ($query) or die (mysql_error ());

    Print results
    While ($row = {mysql_fetch_array ($result))}
    echo $row ['feedback.zip']. " ". $row ['COUNT (feedback.zip)']. " ". $row ['zipcodes.citystate'];
    echo "< br / > ';
    }
    ? >

    and it fails when I run it says ' Unknown column 'feedback.zip' in "field list '"

    I would be grateful any suggestion on this, I am new on this PHP/MySQL stuff.

    Thank you

    Tony

    Tables listed in the From clause must be separated by commas. As it is, it is evaluated as an alias.

  • 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
  • [Help] Replace the MySQL error message

    In the form of the insert, I want to put a special, instead of mysql_error error message

    Here is an example:

    If ((isset($_POST["MM_insert"])) & & ($_POST ["MM_insert"] == "insert_form")) {}
    $insertSQL = sprintf ("INSERT INTO stuff (title, number) VALUES (%s, %s)," ")
    GetSQLValueString ($_POST ['titla'], "text").
    GetSQLValueString ($_POST ['numbers'], "int"));

    @mysql_select_db ($database_connection, $connection);
    $Result1 = mysql_query ($insertSQL, $connection) or die (mysql_error ());

    cause I get an error like cannot be null

    Thank you.

    [Subject line edited by moderator to make it more explicit]

    If you want to replace the MySQL error message, you can put your own error in quotes in the die() command. Change this:

    $Result1 = mysql_query($insertSQL, $connection) or die(mysql_error());
    

    to do this:

    $Result1 = mysql_query($insertSQL, $connection) or die('Database error');
    

    However, it is not very useful for a user, because all that appears is "Database error" with no indication of what caused the error or sort of a return to the page, except using the browser back button.

    A better way of handling things is to remove the or of the article die (mysql_error ()) code altogether and replace it with a PHP conditional statement that returns the user to an error page if the SQL code fails for some reason any. However, these changes will prevent you to make other changes to the server through the server behaviors panel behavior.

    $Result1 = mysql_query($insertSQL, $connection);
    
    if (!$Result1) {
      $insertGoTo = 'error.php';
    } else {
      $insertGoTo = 'another_page.php' // <-- this is the original $insertGoTo line
    }
    

Maybe you are looking for