Php mySQL filtering problem...really desperate

Hi
I have a live site that is currently causing me some issues
It is a fashion site that sends the product information that is pulled in from sevaral table to the checkout.. the issue i am having is the incorrect stock id is being sent to the checkout so when it returns from the gateway it is updating the wrong stock levels.
What is happening currently is the stockID from the first size is being sent.
what i have is the following tables
table 1 - beauSS13_products
ProductID
CatID
table 2 - beauSS13_Cat
catID
table3 - beauSS13_Stock
StockID
ID (this was named like this incorrectly) but this joins with ProductID
SizeID
Stock
beauSS13_SizeList
SizeID
Size
the SQL is
$var1_rsProduct = "-1";
if (isset($_GET['ProductID'])) {
  $var1_rsProduct = $_GET['ProductID'];
mysql_select_db($database_beau, $beau);
$query_rsProduct = sprintf("SELECT * FROM beauSS13_Cat, beauSS13_products, beauSS13_Stock, beauSS13_SizeList WHERE beauSS13_products.CatID = beauSS13_Cat.catID AND beauSS13_products.ProductID = beauSS13_Stock.ID AND beauSS13_Stock.SizeID = beauSS13_SizeList.SizeID AND beauSS13_products.ProductID = %s AND beauSS13_Stock.Stock != 0 ", GetSQLValueString($var1_rsProduct, "int"));
i think beauSS13_products.ProductID = beauSS13_Stock.ID shouldnt be there ( but am not sure what it should have )
I need to identify the Unique Stock ID from table3 - beauSS13_Stock
basically cant get my head round the logic...
if i remove beauSS13_products.ProductID = beauSS13_Stock.ID
then in the
select list
<select name="SelectSize" id="SelectSize">
        <option value="Select Size">Select Size</option>
        <?php
do { 
?>
        <option value="<?php echo $row_rsProduct['Size']?>"><?php echo $row_rsProduct['Size']?></option>
        <?php
} while ($row_rsProduct = mysql_fetch_assoc($rsProduct));
  $rows = mysql_num_rows($rsProduct);
  if($rows > 0) {
      mysql_data_seek($rsProduct, 0);
            $row_rsProduct = mysql_fetch_assoc($rsProduct);
?>
      </select>
it outputs all sizes from the ProductID and not just from the selected item
i have just tried
      <select name="SelectSize" id="SelectSize">
        <option value="Select Size">Select Size</option>
        <?php
do { 
?>
        <option value="<?php echo $row_rsProduct['Size']?>"><?php echo $row_rsProduct['Size']?><?php echo $row_rsProduct['StockID']; ?></option>
        <?php
} while ($row_rsProduct = mysql_fetch_assoc($rsProduct));
  $rows = mysql_num_rows($rsProduct);
  if($rows > 0) {
      mysql_data_seek($rsProduct, 0);
            $row_rsProduct = mysql_fetch_assoc($rsProduct);
?>
      </select>
and adding <?php echo $row_rsProduct['StockID']; ?>
i can see the correct StockID is showing in the size menu but i just need to get that to send to cart
this is the code that sends the details to the cart
$XC_editAction1 = $_SERVER["PHP_SELF"];
if (isset($_SERVER["QUERY_STRING"])) $XC_editAction1 = $XC_editAction1 . "?" . $_SERVER["QUERY_STRING"];
if (isset($_POST["XC_addToCart"]) && $_POST["XC_addToCart"] == "form1") {
  $NewRS=mysql_query($query_rsProduct, $beau) or die(mysql_error());
  $XC_rsName="rsProduct"; // identification
  $XC_uniqueCol="ProductID";
  $XC_redirectTo = "";
  $XC_redirectPage = "../cart.php";
  $XC_BindingTypes=array("RS","RS","FORM","FORM","RS","RS","RS","NONE");
  $XC_BindingValues=array("StockID","ProductID","SelectSize","Quantity","Product","Price"," Stock","");
  $XC_BindingLimits=array("","","","","","","","");
  $XC_BindingSources=array("","","","","","","","");
  $XC_BindingOpers=array("","","","","","","","");
  require_once('XCInc/AddToXCartViaForm.inc');

>>Why do you think that?
because it was looking for the specific record, but having added <?php echo $row_rsProduct['StockID']; ?> to the select list it needs to be there
>>You are joining 4 tables so you need 3 join conditions. If that's the correct relationship ( and only you will know that) then the SQL is correct.
yes that is the way the joins are meant to be
>>The problem is most likely how you are assigning values to the cart. When the user selects a color, how is the associated stock id bound to the array?
its sizes they select but same thing, in the above code that the thing i need to pass that value to the cart. the way i have it at the moment is in the code above
i have icluded the full code below to show you how its working
// *** X Shopping Cart ***
$useSessions = false;
$XCName = "beauloves";
$XCTimeout = 1;
$XC_ColNames=array("StockID","ProductID","Size","Quantity","Name","Price","Stock","Total") ;
$XC_ComputedCols=array("","","","","","","","Price");
require_once('XCInc/XCart.inc');
$var1_rsProduct = "-1";
if (isset($_GET['ProductID'])) {
  $var1_rsProduct = $_GET['ProductID'];
mysql_select_db($database_beau, $beau);
$query_rsProduct = sprintf("SELECT * FROM beauSS13_Cat, beauSS13_products, beauSS13_Stock, beauSS13_SizeList WHERE beauSS13_products.CatID = beauSS13_Cat.catID AND beauSS13_products.ProductID = beauSS13_Stock.ID AND beauSS13_Stock.SizeID = beauSS13_SizeList.SizeID AND beauSS13_products.ProductID = %s AND beauSS13_Stock.Stock != 0 ", GetSQLValueString($var1_rsProduct, "int"));
$rsProduct = mysql_query($query_rsProduct, $beau) or die(mysql_error());
$row_rsProduct = mysql_fetch_assoc($rsProduct);
$totalRows_rsProduct = mysql_num_rows($rsProduct);
mysql_select_db($database_beau, $beau);
$query_rsCategory = sprintf("SELECT * FROM beauSS13_products WHERE
beauSS13_products.CatID = (SELECT CatID from beauSS13_products WHERE beauSS13_products.ProductID = %s)", GetSQLValueString($var1_rsProduct, "int"));
$rsCategory = mysql_query($query_rsCategory, $beau) or die(mysql_error());
$row_rsCategory = mysql_fetch_assoc($rsCategory);
$totalRows_rsCategory = mysql_num_rows($rsCategory);
//  *** Add item to Shopping Cart via form ***
$XC_editAction1 = $_SERVER["PHP_SELF"];
if (isset($_SERVER["QUERY_STRING"])) $XC_editAction1 = $XC_editAction1 . "?" . $_SERVER["QUERY_STRING"];
if (isset($_POST["XC_addToCart"]) && $_POST["XC_addToCart"] == "form1") {
  $NewRS=mysql_query($query_rsProduct, $beau) or die(mysql_error());
  $XC_rsName="rsProduct"; // identification
  $XC_uniqueCol="ProductID";
  $XC_redirectTo = "";
  $XC_redirectPage = "../cart.php";
  $XC_BindingTypes=array("RS","RS","FORM","FORM","RS","RS","RS","NONE");
  $XC_BindingValues=array("StockID","ProductID","SelectSize","Quantity","Product","Price"," Stock","");
  $XC_BindingLimits=array("","","","","","","","");
  $XC_BindingSources=array("","","","","","","","");
  $XC_BindingOpers=array("","","","","","","","");
  require_once('XCInc/AddToXCartViaForm.inc');
function DoFormatCurrency($num,$dec,$sdec,$sgrp,$sym,$cnt) {
  setlocale(LC_MONETARY, $cnt);
  if ($sdec == "C") {
    $locale_info = localeconv();
    $sdec = $locale_info["mon_decimal_point"];
    $sgrp = $sgrp!="" ? $locale_info["mon_thousands_sep"] : "";
    $sym = $cnt!="" ? $locale_info["currency_symbol"] : $sym;
  $thenum = $sym.number_format($num,$dec,$sdec,$sgrp);
  return $thenum;
then below is the form that sends the information to the cart
<form id="form1" name="form1" method="post" action="<?php echo $XC_editAction1; ?>">
<select name="SelectSize" id="SelectSize">
        <option value="Select Size">Select Size</option>
        <?php
do { 
?>
        <option value="<?php echo $row_rsProduct['Size']?>"><?php echo $row_rsProduct['Size']?></option>
        <?php
} while ($row_rsProduct = mysql_fetch_assoc($rsProduct));
  $rows = mysql_num_rows($rsProduct);
  if($rows > 0) {
      mysql_data_seek($rsProduct, 0);
            $row_rsProduct = mysql_fetch_assoc($rsProduct);
?>
      </select>
      <select name="Quantity">
        <option value="Select Quantity">Select Quantity</option>
        <option value="1">1</option>
        <option value="2">2</option>
        <option value="3">3</option>
        <option value="4">4</option>
        <option value="5">5</option>
      </select>
<input type="image" src="../images/SS13AddToCart.jpg" border="0" name="submit"/>
<input type="hidden" name="XC_recordId" value="<?php echo $row_rsProduct['ProductID']; ?>" />
      <input type="hidden" name="XC_addToCart" value="form1" />
      </form>

Similar Messages

  • Dreamweaver PHP/mySQL poll problem?

    Hi,
    I'm a PHP/mySQL noob who's using some of Dreamweaver's 8
    (8.2) out-of-box Update server behaviors to update a database of
    results for a poll. I know there's a lot of free polling apps out
    there but I need to have the poll show up in another page as
    opposed to being refreshed/displayed in the same page/content area.
    I've successfully built the backend in phpMyAdmin and I'm
    able to list the database contents and do basic updates to the poll
    questions and answers. However, I've been unable to pass an
    incremented result value via a Dreamweaver radio button group
    (which is the normal poll format) without previous unselected
    results being overwritten.
    When an answer is selected the result is indeed incremented
    and is displayed in the Result Listing but unfortunately it also
    overwrites any preexisting data for that poll and replaces it with
    zero. For example:
    Question:
    Answer a) 0
    Answer b) 0
    Answer c) 1 (this would be the value that was selected)
    Answer d) 0
    If c is selected again the value is stored and incremented
    and the value is now 2. However, if that value is not selected,
    then another value is incremented and c would be wiped. I've even
    resorted to trying to use javascript to maintain the original state
    but to no avail I was just previously incrementing the inline php
    radio button value and/or assigning different names to each of the
    radio buttons. This, of course, allows people to select multiple
    values which runs contrary to the whole idea behind radio buttons,
    but I thought I'd see if that worked . Anyway, when the radio group
    is assigned the same value it merely increments everything.
    example:
    http://www.dailydatum.com/funFacts/funFactsListingSingleUpdate15.php
    As you can see, i'm up to version 15 and gritting me teeth,
    lol. Any help would be mighty appreciated.
    Mario

    hi ,
    you can always try the macromedia devnet sites , they have
    ongoing tutorials and discussions on all areas, including php with
    dreamweaver8.
    http://www.adobe.com/devnet/topics/php.html
    be aware though that some of the tutorials require the use of
    third party php extensions, like interakt products, which is a
    shame because most of them are expensive to buy. But they are still
    worth a read.
    hope this is some help.
    ted.

  • Leopard PHP MySQL socket problems

    I'm running a default Mac OS X 10.5 Apache2 installation locally, with PHP and MySQL tacked on. I'm running into some trouble running MySQL queries from PHP, namely:
    Can't connect to local MySQL server through socket '/var/mysql/mysql.sock'
    It appears that PHP was compiled with the configuration command '--with-mysql-sock=/var/mysql' but in Terminal the mysqladmin binary reports the UNIX socket as /tmp/mysql.sock. A check reveals that there is indeed a /tmp/mysql.sock, but no /var/mysql/mysql.sock. This appears to be one of those directory differences between Darwin and the standard MySQL distribution.
    Anyhow, I really don't know the best way to attempt to patch this up even after reading suggestions in the MySQL manual. Setting up an option file for mysql to point to /var/mysql didn't improve matters, nor did explicitly setting socket settings in my PHP config file.
    I'm more of a front-end developer not well versed in back end configuration jazz, so any input would be appreciated.

    the other way to fix this is to edit /etc/php.ini and set the following:
    mysql.default_port = /tmp/mysql.sock
    mysqli.default_port = /tmp/mysql.sock
    mysql.default_sock = /tmp/mysql.sock
    mysqli.default_sock = /tmp/mysql.sock

  • Dynamic Dropdown / PHP / MySQLi / Javascript Problem

    I have 2 pages, namely main.html and list.php The Main Pageincludes the following code and consists of a dropdown that i want to pull some database records into by calling the function fillCategory contained in list.php
    Content on main.html
    <!doctype html public "-//w3c//dtd html 3.2//en">
    <html>
    <head>
    <title>Page Title</title>
    <script language="javascript" src="list.php"></script>
    </head>
    <body bgcolor="#ffffff" text="#000000" link="#0000ff" vlink="#800080" alink="#ff0000" onload="fillCategory();">
    <FORM name="drop_list" action="yourpage.php" method="POST" >
    <SELECT NAME="Category" >
    <Option value="">Category</option>
    </SELECT> 
    </form>
    </body>
    </html> 
    Content of list.php
    <?php 
    require_once('mysqli_connect.php');
    echo "
    function fillCategory(
    $q="select * from category"; 
    echo mysqli_error($dbc); 
    $r=@mysqli_query($dbc,$q); 
    while($row=mysqli_fetch_array($r,MYSQLI_ASSOC)){
    echo "addOption(document.drop_list.Category, '$row[cat_id]', '$row[category]');";
    ?> 
    I know that records are being pulled from the MySQL database since when i view 127.0.0.1/list.php i can see the following diplayed on the page: 
    function fillCategory( addOption(document.drop_list.Category, '1', 'Sport');addOption(document.drop_list.Category, '2', 'Music');addOption(document.drop_list.Category, '3', 'Art'); 
    which are the contents (Sport, Music, Art) that i'd like to appear in my dropdown. However, i suspect that i shouldn't see the above being displayed in list.php Instead, it should probably be passed to main.html "unseen". Can anyone point out the probable error in my syntax. I can provide more detail on the database structure if it will help. 
    Thanks,
    Mark

    I think that this is the line in error:
    <script language="javascript" src="list.php"></script>
    The <script> tag is generally used to include client-side script. I believe that PHP will recognize on the server-side, but you need to change "javascript" to "php". You may want to use a PHP include or require statement, instead.
    Also, you might need to remove the "<?php" and "?>" delimiters from list.php.
    HTH,
    Randy

  • PHP and MySQL Connection problem

    I am trying to make a PHP MySQL on a remote server connection in Dreamwesaver CS3.
    When I enter the information (host, user, password, etc.) and hit TEST, I get the following error message.
    "Access Denied. The file may not exist, or there could be a permission problem. Make sure you have proper authorization on the server and the server is properly configured."
    I know the user, password, etc. work, as I can access the MySQL database with other software.
    I checked with my host and they say there are no permission problems on their end.
    I have checked the settings on the Test Server page in Site Setup and everything looks correct and works there.
    I have not seen this particular problem described in other forum postings (although there are a LOT of postings on this topic!).
    Any help would be appreciated.

    I thought my testing server was the remote server and is always on as far as I know. I don't know how to turn it on or off.
    Is there some other testing server that I should be aware of?
    Frank
    Date: Wed, 3 Jun 2009 15:43:02 -0600
    From: [email protected]
    To: [email protected]
    Subject: PHP and MySQL Connection problem
    I know you are using remote, but is your testing server on? if not turn that on and see if that does it. it just happened to me working on remote server and could not get mysql conn to work, until I turn on my testing (developer server), then I was able to connect to mysql and the tables that I created in phpmyadmin remotly was downloaded.
    >

  • PHP MySQL data display problem

    I am having trouble getting data to display on my web page.In Dreamweaver CS3, I created a new page.
    Selected PHP as the type.
    Saved it.
    Connected a database and created a recordset (all using Dreamweavers menus. I did not write any code).
    NOTE: The database is on a remote server.
    The TEST button displayed the records from the recordset with no problem.
    On the new page, I then typed some text.
    Then dragged some fields from the Bindings tab to the page.
    I saved it and then went to preview it in my browser.
    The page comes up completely blank. Not even the text shows.
    I then saved the page as an HTML page.
    When I preview this in my browser, the text shows, but the fields and data do not.
    I then tried creating a dynamic table (again, using the Dreamweaver menus.).
    A similar thing happens, ie. If I save it as an HTML, the text shows and the column labels and border shows, but no data.
    Nothing shows if I save it as a PHP file.
    I can view the data online using files created by PHPMagic, so I know the data is there and retrievable.
    It is just in pages created in Dreamweaver that don’t work.
    What am I doing wrong?

    My web server supports PHP. I can disply PHP pages created by other software packages, just not the Dreamweaver ones.
    Frank
    Date: Thu, 4 Jun 2009 19:04:03 -0600
    From: [email protected]
    To: [email protected]
    Subject: PHP MySQL data display problem
    To view php pages - or pages with PHP code in them - in a browser, the page must be served up by a Web server that supports PHP. You can set up a testing server on your local machine for this purpose. Look for WAMP (Windows), MAMP (Mac), or XXAMP for some easily installed packages.
    Mark A. Boyd
    Keep-On-Learnin'
    This message was processed and edited by Jive.
    It shall not be considered an accurate representation of my words.
    It might not even have been intended as a reply to your message.
    >

  • Problems with recordset in PHP/MySQL setting

    We use Dreamweaver CS5 for creating dynamic pages (PHP pages with MySQL database). We test the site locally on a Windows 7 operating system with EasyPHP as WAMP server.
    We often have a problem in managing the record set.
    The following problem occurs quite often:
    We take a PHP page. We create a recordset. We use a dynamic table or a repeated region to show the results of the recordset. So far so good.
    Then we want to change something to the recordset for example the filter. When editing the recordset, the advanced mode is shown, it is impossible to swith to the simple mode.
    By deleting the recordset the problem is not solved. By deleting and afterwards rebuilding the recordset, syntax errors occur. It seems that the php code for building the recordset didn't dissapear.
    The only solutions till now seems to completely restart with a new PHP page.
    Anyone has a solution for this or anyone did experience the same problem ?
    Thank you very much in advance.
    Ilse 

    You cannot switch to Simple mode in the Recordset dialog box if you have made any changes to the SQL in Advanced mode.
    Opening the Recordset dialog box to edit the settings does occasionally result in the code being inserted again instead of being changed. This appears to be an intermittent bug, which I have experienced myself, and know that others have complained about it, too. As far as I know, there is no solution other than to watch carefully the code that Dreamweaver generates.
    If you don't understand the code, you would be well advised to learn what it means and does. Relying on Dreamweaver to do everything for you severely limits what you can do with PHP/MySQL. Adobe regards the server behaviors as quick prototyping tools, rather than for developing production websites.

  • 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

  • (PHP/MySql) Create Recordset but no column

    Thanks for reading this, I am new to PHP/MySql
    I have created a website www.ritchiecraft.co.uk which uses
    PHP/MySql with Dreamweaver 8. I have created recordsets on most
    items pages and filtered data as neccessary. After the site was up
    and running I was required to insert a new topic and when I went to
    create a new page and insert the recordset no data was placed in
    the columns area and the filter/sort options were greyed out. I
    checked the existing pages and found that this was happening to all
    pages with recordsets. The connection, table data was there.
    The site still works fine but I cannot introduce new pages or
    edit existing because of the recordset problem. I was advised
    previously to delete the Dreamweaver cache file but this did not
    help.
    The site is hosted commercially and the database was created
    with phpMyAdmin and dont seem to have any connection problems.
    Thanks for your time and any suggestions are welcome.

    sweetman wrote:
    > How can I set a query so that it sounds like this:
    >
    > SELECT $_GET['id'] FROM mytable ORDER BY myorder ASC?
    You can't do it through the Recordset dialog box. The simple
    way to do
    it is to create this query in the Recordset dialog box:
    SELECT * FROM myTable
    ORDER BY myOrder ASC
    Then go into Code view and locate the following line:
    $query_recordsetName = "SELECT * FROM myTable ORDER BY
    myOrder ASC";
    Change it to this:
    if (isset($_GET['id'])) {
    $col = get_magic_quotes_gpc() ? stripslashes($_GET['id']) :
    $_GET['id'];
    $col = mysql_real_escape_string($_GET['id']);
    else {
    $col = '*';
    $query_recordsetName = "SELECT $col FROM myTable ORDER BY
    myOrder ASC";
    David Powers, Adobe Community Expert
    Author, "The Essential Guide to Dreamweaver CS3" (friends of
    ED)
    Author, "PHP Solutions" (friends of ED)
    http://foundationphp.com/

  • [php+mysql] best way to integrate a tree category menu base on db?

    Hi all,
    I have a products catalog where all products are organized in
    categories.
    The category structure is something similar to this:
    category 1
    subcategory 1.1
    sub-subcategory 1.1.1
    sub-subcategory 1.1.2
    sub-subcategory 1.1.3
    sub-subcategory 1.1.4
    sub-subcategory 1.1.5
    subcategory 1.2
    subcategory 1.3
    category 2
    subcategory 2.1
    subcategory 2.2
    sub-subcategory 2.2.1
    sub-subcategory 2.2.2
    sub-subcategory 2.2.3
    sub-subcategory 2.2.4
    subcategory 2.3
    ...and so on...
    In general, I have 3 category levels.
    I manage these catagories with only one table using self
    foreign keys.
    Now I need to add a tree menu that will reflect the above
    category
    structure.
    I use php + mysql to store the tables (products and
    categories.
    I found several javascript samples that allow you to do
    something similar
    but with static data.
    I'm searching for a tree menu that is easily customizable and
    that can use
    dynamic data from mysql db.
    Is there a tutorial or smple that would do the trick?
    TIA very much!
    tony ;).

    The page I'm trying to create is here www.hollisterairshow.com/plan-results.php and the questionnaire is here www.hollisterairshow.com/helpusplan.php .
    I went ahead and created recordsets using advanced recordsets and these seem to be working, here's a sample SQL
    SELECT *
    FROM plan
    WHERE Saturday = 'Saturday' AND plan.howArriving = 'Auto'
    I created a recordset for each combination of day and transportation mode - six in all
    This selected the correct records.
    To display the count of how many records selected I then used in DW Insert/Data Objects/ Display Record Count/Total Records which generated the following code:
    <?php echo $totalRows_rsSatAuto ?>
    This worked OK - not elegant but OK and I repeated it for each combination of Day and Transportation mode!!
    So there are two problems I'm having:
    I know I can select the records I want but how do I display the sum of the column containing "How many in your party" - i.e. in the PHP code generated above what do I replace $totalRows_rsSatAuto with?
    There are two questions using radio buttons where I'd like to display the count and % for each option selected. I can select all records for these questions but what code do I put to sum the number of selections for each option and what code do I put to calculate the percentage
    I understand the arithmetic involved which is pretty simple but it's the mechanics of coding that has me stumped. It would really help if you could give me a sample for say the "Are you camping overnight" question which has a "Yes/No" option only. In my mundane way I would create two recordsets, one for "Yes" and one for "No", and use the same technique I describe above for counting Total Records in each recordset, but then I'm stuck with how do I calculate and display the percentages. I must be missing something very obvious as I'm sure there just has to be a more elegant solution.
    Thanks so much for your continued interest.
    Tony

  • Host recomendation - linux - php/mysql

    Hi gangsters and molls :)
    I'm looking again for some advice from the knowledgable
    contributors of
    this forum, of which there are many, many, many!
    I'm in need of a host, that provides php/mysql linux and some
    good
    online instructions (preferably the hosts own instructions)
    about
    tranfering/connecting the database up. I'm as thick as two
    planks when
    it comes to moving the the dynamic technical stuff over to a
    remote
    host, so bear that in mind. I try but I'm getting old and
    past my
    sell-by date :(
    I've done this on a couple of occasions (some time ago
    though), spent a
    good few hours resolving connection issues but finally
    everything
    worked. However if anyone knows of a good host and some good
    walk ya
    through instructions to save me some hassle I'd be grateful.
    I'm not really that bothered where the host is (preferably uk
    but I'm
    open minded)........EASE OF USE & SET-UP is paramount on
    this ocassion.
    Cheers!
    Os.

    : Nadia : ** Adobe Community Expert ** wrote:
    > "Osgood" <[email protected]> wrote in
    message
    > news:[email protected]...
    >
    >>Hi gangsters and molls :)
    >>
    >>I'm looking again for some advice from the
    knowledgable contributors of
    >>this forum, of which there are many, many, many!
    >
    >
    > you're being too mich - what's up Os ? ;-)
    Yeah...I'm on new tablets.........seems to be doing the trick
    until my
    immune system fights back.
    >>I'm in need of a host, that provides php/mysql linux
    and some good online
    >>instructions (preferably the hosts own instructions)
    about
    >>tranfering/connecting the database up. I'm as thick
    as two planks when it
    >>comes to moving the the dynamic technical stuff over
    to a remote host, so
    >>bear that in mind. I try but I'm getting old and past
    my sell-by date :(
    >
    >
    >
    > www.hostmysite.com is US based, but I've had no problems
    with email
    > support - they've been great... they also have
    'live-help' I think. They've
    > helped me heaps in setting up dbs or fixed errors when I
    did a few installs
    > of various CMSs...
    Yup...you've mentioned them before in some previous posts,
    I'll check
    them out.
    > www.webstrikesolutions.com been with them for years...
    email support is
    > terrific (no phone support, but live chat again).
    Haven't had much to do
    > with php side of things with them, though they have both
    win and linux
    > servers, most of my clients are on windows and a couple
    of clients on linux.
    > Had to have help with a couple of asp dbs and they were
    great help there.
    Humm....why does a connection to a remote database seem so
    imposing.
    Should be a simple drag and drop solution.
    I don't even know where the database file is created on my
    Mac but
    apparently you have to create a 'dump' file to transfer it to
    a remote
    location. I can do that in phpMyAdmin but wouldn't it be
    simple if there
    was an identifiable file which you could just grab hold of
    and drag
    across.......bummer all seem complicated to me.
    > www.crystaltech.com have also been great to work with -
    again US based,
    > help docs are a bit sparse - or it could be me not
    understanding them :-)
    > but email support is good.
    Humm I have some instruction docs from a host that I have
    previously
    used but thaey might as well be written in chinese.
    Do you know if I can set up a website on one server and have
    it pull
    information from a database which is hosted on another
    server?
    Os.

  • Thinking of learning to build sites with PHP/MySQL

    Is it worth it to invest the time and brain power? I've been
    using Dreamweaver for years. None of my sites really are so large
    that I'm having issues. But, I could see some down the road that
    might be too complex and large.
    I'm having some problems figuring out where to begin. Any
    suggestions on books that specifically deal with Dreamweaver and
    database driven sites?

    David Powers 'Foundation PHP for Dreamweaver 8' is what got
    me started. I
    was able to work through most of it in a weekend. He takes
    you step by step
    on how to set up your computer to run PHP/MySQL, and then you
    build a series
    of increasingly complex projects with each new aspect of
    PHP/MySQL that he
    teaches.
    He has some newer books out, too, if you have a more recent
    version of DW:
    http://foundationphp.com/
    ...Brenda
    "PeteC" <[email protected]> wrote in
    message
    news:g4dn2u$1gh$[email protected]..
    > synterx wrote:
    >> Is it worth it to invest the time and brain power?
    I've been using
    >> Dreamweaver for years. None of my sites really are
    so large that I'm
    >> having issues. But, I could see some down the road
    that might be too
    >> complex and large.
    >>
    >> I'm having some problems figuring out where to
    begin. Any suggestions
    >> on books that specifically deal with Dreamweaver and
    database driven
    >> sites?
    >
    > Anything by David Powers (of this parish) will be an
    exceedingly good
    > investment..
    >
    > Pete.
    > --
    > Peter Connolly
    >
    http://www.kpdirection.com
    > Utah
    >

  • AS3 / PHP / MySQL - login form

    Hello,
    I'm trying to create the most basic example I can of an AS3/PHP/MySQL interaction.  I want a Flash movie to check a user's login/pass against a DB.  I've tested the PHP code and know it's correct.  The problem must lie in the AS.  I've traced everything to make sure it goes out correctly, but it comes back as the variable names $user, $pass...and some other garbage... not the variable values I am expecting... see below.
    The PHP code correctly returns the following when tested in browser:  user=dan&pass=danpass&err=Success!
    The traced variables $user, $pass, $err return the following in Flash:
    undefined
    $pass
    $err";
        echo $returnString;
    ?>
    Here's the ActionScript:
    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 = URLLoaderDataFormat.VARIABLES;
      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's 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 = $row["user"];
        $pass = $row["pass"];
        $err = "Success!";
        $returnString = "user=$user&pass=$pass&err=$err";
        echo $returnString;
    ?>
    Does anything stand out as being wrong?  I've gone over this for probably 10-15 hours trying different variations, tweaks, and reducing it in complexity.  I will really appreciate any help you can offer!  Thank you.
    -Eric

    Thanks Birnerseff! 
    I've been running the SWF from the same directory as the PHP script.  I just tried viewing it through my localhost and it worked!  I guess I'll have to do all my testing that way, but that's fine.
    Thank you very much.  I probably wouldn't have messed around with that for a long time otherwise.
    -Eric

  • Can't connect PHP/MySQL 404 error

    Wow, the learning curve is killing me. Yet another challenge. I'm using Dreamweaver CC and this tutorial http://www.adobe.com/devnet/dreamweaver/articles/setup_php.html
    I'm at this step:
    Open comments.php. You must have a PHP page open in the Document window to create a MySQL connection.
    In the Databases panel (choose Window > Databases), click the Plus button on the panel and select MySQL Connection.The MySQL Connection dialog box appears.
    Type connTest as the connection name.
    For the MySQL Server, type localhost.If you are using the MAMP default ports on a Mac, use localhost:8889.
    For the User Name, type phptestuser.
    Type the password you chose for the phptestuser account in the Password field.
    For the Database, type php_test.Note: You don't need to precede the underscore with a backslash here. It was inserted by phpMyAdmin in the previous section (see Figure 20) only because phpMyAdmin uses a query that permits wildcard characters.
    Click Test.Dreamweaver attempts to connect to the database. If the connection fails, do the following:
    Double-check the server name, user name, and password.
    Check the settings for the folder Dreamweaver uses to process dynamic pages (see Specifying a Testing Server for Dreamweaver).
    Verify that the web and MySQL servers are both running.
    Temporarily disable any firewall or security program. If the connection works, you need to configure the security program to permit communication between Dreamweaver and MySQL.
    Click OK. The new connection appears in the Databases panel.
    Expand the connTest connection, and then expand the Tables branch. You'll see the comments table in the database, which you can expand to reveal the details of the table columns (see Figure 23).
    As far as I can tell I have followed this tutorial to the letter.
    As far as I can tell, XAMPP/php mySQL are all running fine, the files are in the correct place and everything should be working. However when I hit test I get a 404 error. (Same error when I hit the select button.)
    The suggested problems on the 404 message are:
    1. There is no testing server running on the server machine.
    Pretty sure the testing server is running. Is there any way to test this, other than to note that xampp is definitely running right now and that I can log into phpMYadmin no problem?
    2. The testing server specified for this site does not map to the http://localhost/php_test/_MMServerScripts/MMHTTPDB.php URL Verify that the URL Prefix maps to the root of the site.
    Ummm...I'm pretty sure I put things where I was told to put them in the tutorial, but I'm lost at this point where I should verify what. A clue here? The files are where they are supposed to be, but maybe I entered something wrong? Except...I'm not sure what that could be or where to find it. Whatever IT is.
    Everything in local files is looking good.
    Thanks for your help!
    PS: Extra points to anyone who figures out how to make copy/pasteable error messages! These buggers are the bane of my life!

    Bgupta, you rock!
    I hope you have copied the "mysql.php" and "MMHTTPDB.php" files from "C:\Users\username\AppData\Roaming\Adobe\Dreamweaver CC\locale\Configuration\Connections\Scripts\PHP_MySQL\_mmDBScripts" to "C:\xampp\htdocs\phptest\_mmServerScripts"
    This was EXACTLY the problem. I checked the tutorial and I couldn't even find where the tutorial said to do this. (If I missed it, let me know where in the tutorial it was, please.)
    Fixed!

  • PHP,MYSQL,ORACLE,APACHE issue?

    Hello All,
    In my oracle 10gr2 server that is build on rhel4, we have web based portal, now that web based portal connects to oracle and mysql, my problem is that, the developer told me that i have to install php4, apache2 with support of OCI8, i have tried every thing in google but unable to find, how can i do this, please help me out, thanks

    Some example guides show installing Apache as a non-root user just to avoid breaking production web servers when installing for the first time. A non-root user cannot start Apache on a privileged port like 80. Once you're familiar with the install process you can always install on the system default Apache or use 80 as the port number.
    The free, prebuilt PHP and Oracle-client stack called Zend Core for Oracle runs on x64. ZCO can be very easy to install. http://www.oracle.com/technology/tech/php/zendcore/index.html
    -- cj

Maybe you are looking for

  • Album art mixed up on Ipod 5G

    Hello, I have a 5g ipod and recently finished riping over 200 CD's to Itunes. I added album art to every song on every disk . My Ipod is displaying the album art but it is displaying the wrong art on many songs. Sometimes it shows one art image on th

  • PDF files commented with Android MyLibrary

    Hello. I read a pdf book using Android MyLibrary software, and I made comments and marks on the file. Now when I moved the pdf file back to my PC Adobe Reader shows neither comments or marks -- I got a clean file as when I downloaded it. I read aroun

  • How to do video conferencing using jmf

    hi guys, can anybody help me out on developing a videoconferencing using jmf. ASAP PLZZZZZZZ. my email id is . [email protected] siddhartha

  • OLE to MS Word

    Hi everyone. can anyone please tell me how to merge two coloumns of a table which is being printed in a Word Document using OLE Automation.

  • Question about ASMlib/UDEV

    Hi experts, I will be very happy if someone who have experience with ASMlib/UDEV explain me the following. Yesterday when I start to read about Oracle 11gr2 DB/GRID and OEL6I discovered that I can't download and use asmlib rpm as I previously did in