Php beginners help

G'Day, I have only used dreamweaver for making static pages
so far, but now want to create a dynamic php page. I have installed
and running IIS on XP. At this stage all I want to do is
create/experiment and make a simple page to list my 45's collection
for my jukebox. Do I need to actually install a PHP application or
will Dreamweaver allow me to create and test in its own
environment?.. P.S. I have looked at the tutorials and purchased a
book (The missing manual) but am still a little confused as to the
foundations required to start this new PHP adventure.
Thanks
Ben

Hi Ben:
You need the PHP application server running in order for PHP
code to
process. It's the same with any server model . Cold Fusion to
run that ..
ASP to run that (but you don't notice cause it's built into
IIS). There is
a version of PHP that runs on IIS and it's downloaded at
http://www.php.net.
If you are going to host PHP sites on a Unix server however,
you are better
off to download and install Apache (
http://www.apache.org) and
install that
version of PHP. It's up to you .. I would advise matching the
production
environment as closely as possible.
Nancy Gill
Adobe Community Expert
Author: Dreamweaver 8 e-book for the DMX Zone
Co-Author: Dreamweaver MX: Instant Troubleshooter (August,
2003)
Technical Editor: DMX 2004: The Complete Reference, DMX 2004:
A Beginner''s
Guide, Mastering Macromedia Contribute
Technical Reviewer: Dynamic Dreamweaver MX/DMX: Advanced PHP
Web Development
"ben here" <[email protected]> wrote in
message
news:ekkv1a$kq6$[email protected]..
> G'Day, I have only used dreamweaver for making static
pages so far, but
> now
> want to create a dynamic php page. I have installed and
running IIS on XP.
> At
> this stage all I want to do is create/experiment and
make a simple page to
> list
> my 45's collection for my jukebox. Do I need to actually
install a PHP
> application or will Dreamweaver allow me to create and
test in its own
> environment?.. P.S. I have looked at the tutorials and
purchased a book
> (The
> missing manual) but am still a little confused as to the
foundations
> required
> to start this new PHP adventure.
>
> Thanks
> Ben
>

Similar Messages

  • Error message when I run searches on my website (PHP/MySQL help)

    Hey guys, can someone tell me why this is happening in my PHP? I run a search on my website and get this error message ye sI filled the hostname, username and password)
    Results for
    PHP Error Message
    Warning:  mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/a8295382/public_html/Search Results.php on line 233
    Couldn't execute query
    Here is my PHP code:
    <?php
    $hostname_logon = "host" ;
    $database_logon = "hostname" ;
    $username_logon = username" ;
    $password_logon = "password" ;
    //open database connection
    $connections = mysql_connect($hostname_logon, $username_logon, $password_logon) or die ( "Unabale to connect to the database" );
    //select database
    mysql_select_db($database_logon) or die ( "Unable to select database!" );
    //specify how many results to display per page
    $limit = 15;
    //get the search variable from URL
    $var = mysql_real_escape_string(@$_REQUEST['q']);
    //get pagination
    $s = mysql_real_escape_string($_REQUEST['s']);
    //set keyword character limit
    if(strlen($var) < 3){
        $resultmsg =  "<p>Search Error</p><p>Keywords with less then three characters are omitted...</p>" ;
    //trim whitespace from the stored variable
    $trimmed = trim($var);
    $trimmed1 = trim($var);
    //separate key-phrases into keywords
    $trimmed_array = explode(" ",$trimmed);
    $trimmed_array1 = explode(" ",$trimmed1);
    // check for an empty string and display a message.
    if ($trimmed == "") {
        $resultmsg =  "<p>Search Error</p><p>Please enter a search...</p>" ;
    // check for a search parameter
    if (!isset($var)){
        $resultmsg =  "<p>Search Error</p><p>We don't seem to have a search parameter! </p>" ;
    // Build SQL Query for each keyword entered
    foreach ($trimmed_array as $trimm){
    // EDIT HERE and specify your table and field names for the SQL query
    // MySQL "MATCH" is used for full-text searching. Please visit mysql for details.
    $query = "SELECT * , MATCH (field1, field2) AGAINST ('".$trimm."') AS score FROM table_name WHERE MATCH (field1, field2) AGAINST ('+".$trimm."') ORDER BY score DESC";
    // Execute the query to  get number of rows that contain search kewords
    $numresults=mysql_query ($query);
    $row_num_links_main =mysql_num_rows ($numresults);
    //If MATCH query doesn't return any results due to how it works do a search using LIKE
    if($row_num_links_main < 1){
        $query = "SELECT * FROM table_name WHERE field1 LIKE '%$trimm%' OR field2 LIKE '%$trimm%'  ORDER BY field3 DESC";
        $numresults=mysql_query ($query);
        $row_num_links_main1 =mysql_num_rows ($numresults);
    // next determine if 's' has been passed to script, if not use 0.
    // 's' is a variable that gets set as we navigate the search result pages.
    if (empty($s)) {
         $s=0;
      // now let's get results.
      $query .= " LIMIT $s,$limit" ;
      $numresults = mysql_query ($query) or die ( "Couldn't execute query" );
      $row= mysql_fetch_array ($numresults);
      //store record id of every item that contains the keyword in the array we need to do this to avoid display of duplicate search result.
      do{
          $adid_array[] = $row[ 'field_id' ];
      }while( $row= mysql_fetch_array($numresults));
    } //end foreach
    //Display a message if no results found
    if($row_num_links_main == 0 && $row_num_links_main1 == 0){
        $resultmsg = "<p>Search results for: ". $trimmed."</p><p>Sorry, your search returned zero results</p>" ;
    //delete duplicate record id's from the array. To do this we will use array_unique function
    $tmparr = array_unique($adid_array);
    $i=0;
    foreach ($tmparr as $v) {
       $newarr[$i] = $v;
       $i++;
    //total result
    $row_num_links_main = $row_num_links_main + $row_num_links_main1;
    // now you can display the results returned. But first we will display the search form on the top of the page
    echo '<form action="search.php" method="get">
            <div>
            <input name="q" type="text" value="'.$q.'">
            <input name="search" type="submit" value="Search">
            </div>
    </form>';
    // display an error or, what the person searched
    if( isset ($resultmsg)){
        echo $resultmsg;
    }else{
        echo "<p>Search results for: <strong>" . $var."</strong></p>";
        foreach($newarr as $value){
        // EDIT HERE and specify your table and field unique ID for the SQL query
        $query_value = "SELECT * FROM newsight_articles WHERE field_id = '".$value."'";
        $num_value=mysql_query ($query_value);
        $row_linkcat= mysql_fetch_array ($num_value);
        $row_num_links= mysql_num_rows ($num_value);
        //create summary of the long text. For example if the field2 is your full text grab only first 130 characters of it for the result
        $introcontent = strip_tags($row_linkcat[ 'field2']);
        $introcontent = substr($introcontent, 0, 130)."...";
        //now let's make the keywods bold. To do that we will use preg_replace function.
        //Replace field
          $title = preg_replace ( "'($var)'si" , "<strong>\\1</strong>" , $row_linkcat[ 'field1' ] );
          $desc = preg_replace ( "'($var)'si" , "<strong>\\1</strong>" , $introcontent);
          $link = preg_replace ( "'($var)'si" , "<strong>\\1</strong>" ,  $row_linkcat[ 'field3' ]  );
            foreach($trimmed_array as $trimm){
                if($trimm != 'b' ){
                    $title = preg_replace( "'($trimm)'si" ,  "<strong>\\1</strong>" , $title);
                    $desc = preg_replace( "'($trimm)'si" , "<strong>\\1</strong>" , $desc);
                    $link = preg_replace( "'($trimm)'si" ,  "<strong>\\1</strong>" , $link);
                 }//end highlight
            }//end foreach $trimmed_array
            //format and display search results
                echo '<div class="search-result">';
                    echo '<div class="search-title">'.$title.'</div>';
                    echo '<div class="search-text">';
                        echo $desc;
                    echo '</div>';
                    echo '<div class="search-link">';
                    echo $link;
                    echo '</div>';
                echo '</div>';
        }  //end foreach $newarr
        if($row_num_links_main > $limit){
        // next we need to do the links to other search result pages
            if ($s >=1) { // do not display previous link if 's' is '0'
                $prevs=($s-$limit);
                echo '<div class="search_previous"><a href="'.$PHP_SELF.'?s='.$prevs.'&q='.$var.'">Previous</a>
                </div>';
        // check to see if last page
            $slimit =$s+$limit;
            if (!($slimit >= $row_num_links_main) && $row_num_links_main!=1) {
                // not last page so display next link
                $n=$s+$limit;
                echo '<div  class="search_next"><a href="'.$PHP_SELF.'?s='.$n.'&q='.$var.'">Next</a>
                </div>';
        }//end if $row_num_links_main > $limit
    }//end if search result
    ?>
    Anyone got any ideas as to why this is happening?
    Also, I have not created any tables in my database... is this why it doesn't display any search results from my website?

    Sorry, but it doesn't help JTANNA.
    What is your definition of "more efficiently"? If it's limitation of search results, branded search, and limitation of styling your results then google search is more efficient. Real developers rely on their own developments. For example: how can google search display results from a password-protected site? They can't.
    best,
    Shocker

  • PHP need help formating date, please.

    I am working on my first database page using repeating fields
    and a
    connection to MySQL, and actually have it working! Yay!
    Now I have a formatting problem, and would appreciate a bit
    of help.
    The first column of the repeating field is a date field,
    which is stored
    as a date type in mysql, and shows up in my table as
    2008-03-12 (which
    is how it was entered into the table). I would like to change
    the
    display to March 12, 2008. I have tried using the date
    function, but
    without success. The text that php is putting in the cell is
    "2008-03-12", which I am guessing is not a valid timestamp. I
    am also
    guessing that this is why I get a date in 1969 when I try
    this...
    The page is here:
    http://www.verodelmar.com/agendas.php
    and the source is here:
    http://www.verodelmar.com/agendas.txt
    Thanks to anyone that takes the time to look!
    Harvey

    Joe Makowiec wrote:
    > On 16 Apr 2008 in macromedia.dreamweaver, eclipsme
    wrote:
    >
    >> The first column of the repeating field is a date
    field, which is
    >> stored as a date type in mysql, and shows up in my
    table as
    >> 2008-03-12 (which is how it was entered into the
    table). I would
    >> like to change the display to March 12, 2008. I have
    tried using the
    >> date function, but without success. The text that
    php is putting in
    >> the cell is "2008-03-12", which I am guessing is not
    a valid
    >> timestamp. I am also guessing that this is why I get
    a date in 1969
    >> when I try this...
    >
    > Use DATE_FORMAT in your SQL statement, thus:
    >
    > SELECT field1, field2,
    > DATE_FORMAT(dateField, '%M %e, %Y') AS myFormattedDate
    > FROM myTable
    >
    >
    http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html#function_date-format
    >
    > Another option is to convert the date from ISO format to
    a Unix
    > timestamp using PHP's strtotime() function, then
    formatting it using
    > date():
    >
    > <?php
    > // Done in several steps for clarity. Can be done in one
    step.
    > $myUnixTimestamp =
    strtotime($row_Recordset1['mydatefield']);
    > $myFormattedDate = date('F j, Y', $myUnixTimestamp);
    > echo $myFormattedDate;
    > ?>
    >
    >
    http://www.php.net/strtotime
    >
    http://www.php.net/date
    >
    The former I think I understand.
    The latter I have printed out and will look at some more.
    Actually in
    theory I understand, but how to do that in my control panel
    is what I
    need to look at.
    Thanks!
    Harvey

  • Creating A Report need PHP MYSQl HElP

    I have a table "officers" table two with 4 fields all with
    variable char which will end up just being names. However, I need
    to create a report that counts each the occurance of each name and
    ouputs the name with the count next to it. The names in table
    "officers" are concatinated from a first name field and last name
    field in a separate table "persons";
    I need some help figuring out how to write this using
    PHP.

    Hi Shashank,
    SQL Server Reporting Services provides a full range of ready-to-use tools and services to help us create, deploy, and manage reports for our organization, as well as programming features that enable us to extend and customize our reporting functionality.
    With Reporting Services, we can create interactive, tabular, graphical, or free-form reports from relational, multidimensional, or XML-based data sources. To create a basic table report, we can refer to the tutorial as below:
    http://msdn.microsoft.com/en-IN/library/ms167305(v=sql.110).aspx
    For more information and tutorials about Reporting Services, please refer to the following documents:
    Reporting Services (SSRS)
    Reporting Services Tutorials (SSRS)
    Hope this helps.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • PHP form help - results not appearing in email

    Hi I have set up a simple entry form, and I am submiting it
    using PHP to my email address, It works well when you fill the form
    in and send it, I receive the email however the email only displays
    the questions and not the answers that have been filled in on the
    form. Itss driving me crazy as top why this is not working. Can
    someone please help?
    here is my form code, both form and PHP. Thanx

    I haven't checked the form, but I had a similar problem with
    my server when they upgraded their systems recently. I would
    receive the email, but it was blank.
    Th reason was ...
    As long as your scripts do not need "register_globals" they
    will work.
    The default php mail command works. Again - no
    "register_globals".
    A lot of old and lazy written scripts rely on it. But it is a
    major
    security risk - even more so on shared servers - and as such
    has been
    disabled by default in PHP since version 3.0.3.

  • Issue with send_form_email.php! Help!

    Hello,  I can not seem to get my contact form working properly.  It was working fine so I don't know what the issue is! Any help is much appreciated!
    HTML:
    http://www.bigbearhideaway.com/Main%20Pages/contact.html
    <form name="contactform" method="post" action="../send_form_email.php">
      <div align="center">
        <table width="450px">
          <tr>
            <td valign="top">
              <label for="first_name">First Name *</label>
              </td>
            <td valign="top">
              <input  type="text" name="first_name" maxlength="50" size="30">
              </td>
            </tr>
          <tr>
            <td valign="top"">
              <label for="last_name">Last Name *</label>
              </td>
            <td valign="top">
              <input  type="text" name="last_name" maxlength="50" size="30">
              </td>
            </tr>
          <tr>
            <td valign="top">
              <label for="email">Email Address *</label>
              </td>
            <td valign="top">
              <input  type="text" name="email" maxlength="80" size="30">
              </td>
            </tr>
          <tr>
            <td valign="top">
              <label for="telephone">Telephone Number</label>
              </td>
            <td valign="top">
              <input  type="text" name="telephone" maxlength="30" size="30">
              </td>
            </tr>
          <tr>
            <td valign="top">
              <label for="comments">Comments *</label>
              </td>
            <td valign="top">
              <textarea  name="comments" maxlength="1000" cols="25" rows="6"></textarea>
              </td>
            </tr>
          <tr>
            <td colspan="2" style="text-align:center">
              <input type="submit" value="Submit"></td>
            </tr>
        </table>
      </div>
    </form>
    </div>
    PHP:
    <?php
    if(isset($_POST['email'])) {
        // EDIT THE 2 LINES BELOW AS REQUIRED
        $email_to = "[email protected]";
        $email_subject = "Big Bear Hideaway";
        function died($error) {
            // your error code can go here
            echo "We are very sorry, but there were error(s) found with the form you submitted. ";
            echo "These errors appear below.<br /><br />";
            echo $error."<br /><br />";
            echo "Please go back and fix these errors.<br /><br />";
            die();
        // validation expected data exists
        if(!isset($_POST['first_name']) ||
            !isset($_POST['last_name']) ||
            !isset($_POST['email']) ||
            !isset($_POST['telephone']) ||
            !isset($_POST['comments'])) {
            died('We are sorry, but there appears to be a problem with the form you submitted.');      
        $first_name = $_POST['first_name']; // required
        $last_name = $_POST['last_name']; // required
        $email_from = $_POST['email']; // required
        $telephone = $_POST['telephone']; // not required
        $comments = $_POST['comments']; // required
        $error_message = "";
        $email_exp = '/^[A-Za-z0-9._%-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/';
      if(!preg_match($email_exp,$email_from)) {
        $error_message .= 'The Email Address you entered does not appear to be valid.<br />';
        $string_exp = "/^[A-Za-z .'-]+$/";
      if(!preg_match($string_exp,$first_name)) {
        $error_message .= 'The First Name you entered does not appear to be valid.<br />';
      if(!preg_match($string_exp,$last_name)) {
        $error_message .= 'The Last Name you entered does not appear to be valid.<br />';
      if(strlen($comments) < 2) {
        $error_message .= 'The Comments you entered do not appear to be valid.<br />';
      if(strlen($error_message) > 0) {
        died($error_message);
        $email_message = "Form details below.\n\n";
        function clean_string($string) {
          $bad = array("content-type","bcc:","to:","cc:","href");
          return str_replace($bad,"",$string);
        $email_message .= "First Name: ".clean_string($first_name)."\n";
        $email_message .= "Last Name: ".clean_string($last_name)."\n";
        $email_message .= "Email: ".clean_string($email_from)."\n";
        $email_message .= "Telephone: ".clean_string($telephone)."\n";
        $email_message .= "Comments: ".clean_string($comments)."\n";
    // create email headers
    $headers = 'From: '.$email_from."\r\n".
    'Reply-To: '.$email_from."\r\n" .
    'X-Mailer: PHP/' . phpversion();
    @mail($email_to, $email_subject, $email_message, $headers); 
    ?>
    <!-- include your own success html here -->
    Thank you for contacting us. We will be in touch with you very soon.
    <?php
    ?>

    ($email_from) should be ($email)
    Nancy O.

  • Apache2, PHP, MySQL Help

    Hi,
    Sorry if this is a bit of a newbie thing todo but I am not too good with solaris configuration yet.
    Can anyone supply a decent step by step and easy tutorial/how-to on how to set up Apache, PHP, MySQL and PHPmyadmin on a SPARC solaris 10 box please...
    Thanks Rob

    Can anyone supply a decent step by step and easy
    tutorial/how-to on how to set up Apache, PHP, MySQL
    and PHPmyadmin on a SPARC solaris 10 box please...Setting up Apache is very easy since all it takes is setting it up. Its installed by default, you can check /etc/apache for an example configuration file. Next to that www.apache.org/docs/ is also a very valuable read.
    <blunt SPAM>
    You could also consider looking into the Java webserver (formely SunONE). Its currently being made available for free with the Java Enterprise System and compares very well to Apache. If you'll also be doing some Java it would be a better choice (IMO its a better choice than Tomcat) and it can also do PHP.
    http://www.sun.com/software/products/web_srvr/home_web_srvr.xml
    http://www.zend.com/sun/?article=/sun/index.php&kind=&id=6179&open=1&anc=0&view=1
    http://www.php.net/
    </SPAM>
    As you'll note I included the PHP website because with the above setup you'd also need to manually setup PHP. If you have the companion CD present you can install the PHP module which will end up on /opt/sfw/apache. This directory will also present you a php.ini example which will need to be placed in /etc/apache as well. Setting it up is basicly following the documentation in the ini file, and the Apache documentation on adding an extra module (/opt/sfw/apache/libexec/libphp4.so).
    MySQL. Also very easy since its shipped with Solaris as well. Look into /etc/sfw/mysql for a README which covers the most essential steps to set it up. In short you'll need to setup a few directories for MySQL to work and optionally (but recommended) copy the default config file to /etc (/etc/my.cnf) which will define certain basic settings. The readme explains. Next you're likely to need the MySQL guide (if you're new with MySQL) which can be located at http://dev.mysql.com/doc/refman/4.1/en/index.html.
    This applies to the version (close enough anyway) which is shipped with Solaris. From personal experience I can say that MySQL 5 will also run very well on Solaris 10.
    Finally the PHPMyadmin... That really is an RTFM issue, once you have your environment setup (Apache and the likes) its likely you only need to copy it to your document root and point your browser to it.
    Hopes this helps somewhat.

  • Php Form Help

    I just developed a simple php form (my first time). I am
    trying to enable the information that is typed in the form by
    visitors, to be emailed directly to me. So far I can only get the
    person's email address and message left in information box to be
    sent to my email address. However, there are other contents within
    the form that I also need to receive. Can anyone help.
    http://www.newnie.com/informationform.php
    http://www.newnie.com/handle_form.php

    On 18 Oct 2007 in macromedia.dreamweaver.appdev, CellaMarr
    wrote:
    > When I fill out the form and press send the only
    information that I
    > receive is the "First Name", "Email Address", and
    "Project Details".
    > All the other info does not show up. Why will it only
    send some of
    > the information and not all of it? ("Phone Number",
    "Profession",
    > "Budget", "Hosting", and "Domain")
    Because you're not telling it to send them to you. Consider:
    $success = mail($to, $subject, $detail, $headers);
    This line is correct and sends the email as it should. You're
    telling
    it that you want $detail as the body of the message. However,
    when you
    load variables:
    $name = $_POST['name'];
    $email = $_POST['email'];
    $number = $_POST['number'];
    $detail = $_POST['detail'];
    $profession = $_POST['profession'];
    $entertainer = $_POST['entertainer'];
    $domain = $_POST['domain'];
    $hosting = $_POST['hosting'];
    $subject = 'Message from newnie.com'; // this is the subject
    line. you
    can make this say whatever you want
    $headers = "From: $name <$email>\n";
    $headers .= "Reply-To: $name <$email>\n";
    $to = '[email protected]'; //change this to your email
    you're only putting the contents of the 'detail' form field
    into
    $detail. You need to do something more like:
    $body = 'Name: ' . $_POST['name'] . "\n";
    $body .= 'EMail: ' . $_POST['email'] . "\n";
    $body .= 'Number: " . $_POST['number'] "\n";
    // etc
    $subject = 'Message from newnie.com'; // this is the subject
    line. you
    can make this say whatever you want
    $headers = "From: $name <$email>\n";
    $headers .= "Reply-To: $name <$email>\n";
    And your mail() statement becomes:
    $success = mail($to, $subject, $body, $headers);
    Joe Makowiec
    http://makowiec.net/
    Email:
    http://makowiec.net/contact.php

  • PHP/MySQL Help Needed

    I'm a beginner with this PHP/MySQL language, but I'm using
    Dreamweaver CS3 to help things along. I've set up my database with
    my host (using PHPmyAdmin) and put in a table with some fields.
    Then I went into Dreamweaver and set up everything and it saw the
    database name perfectly. Then I made a recordset and it saw the
    fields just fine. I then made an input page to put the data into
    the database and that went off without a hitch. I then made a basic
    webpage with nothing but the call to display 2 of the fields in my
    database (I did the test in dreamweaver and it saw all the data I
    populated my database with perfectly). I then told it to preview in
    Firefox and got a blank page... Ok I must have done something
    wrong, so I put in some basic text just so I could see if even that
    would show up correctly. Then I previewed in Firefox again and not
    only did it show up, but the 2 fields showed up as well! Yea! So I
    made some changes to the fields I wanted to show and again did a
    Preview in Firefox. I was again treated to a blank page. Not even
    my basic text was showing up. I went back to Dreamweaver and added
    some more text... preview... works perfectly showing everything. I
    refresh the page and it's blank. I close Firefox and preview again.
    It's a blank page, but for the heck of it I decide to View Source
    and lo and behold all the data is there. I close the source and try
    reloading the page... blank. I'm at a loss. Any idea why this might
    be happening?

    jays99 wrote:
    > Thanks, David. I have your PHP5-Flash 8 book and egerly
    await your newest. I
    > installerd MySQL 5.027 for 10.4 intel which but it does
    not come up
    > automatically and there is no MySQL control on the
    Preferences. I read
    > somewhere that I have to open a file and change some
    lines of code in a config.
    > file. Do you have any insight to that? Thanks again, Jay
    Sorry, I haven't tested anything on an Intel Mac yet. Testing
    everything
    on Vista for my new Dreamweaver book has given me enough of a
    headache.
    However, I'm pretty sure that my editor has an Intel Mac, and
    he
    followed the instructions in "PHP Solutions" without any
    major hiccups.
    (They're pretty much the same as in the Flash book.)
    Isn't there a MySQL.prefPane icon in the MySQL installation
    package? I
    have found that MySQL won't start automatically on 10.4 (it
    did on
    10.3), but as long as you install the prefPane, you should be
    able to go
    in and start it manually.
    David Powers, Adobe Community Expert
    Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
    Author, "PHP Solutions" (friends of ED)
    http://foundationphp.com/

  • Flash/PHP form help

    I have posted this before a while back, but never figured it
    out. I think I am really close.
    When my form gets clicked, the following gets triggered:
    var result_lv:LoadVars = new LoadVars();
    result_lv.onLoad = function(success:Boolean) {
    if (success) {
    this.tf_showAlertMsg.text = "Thank you for sending us an
    email";
    } else {
    this.tf_showAlertMsg.text = "Email did not go through";
    var send_lv:LoadVars = new LoadVars();
    send_lv.Name = tName;
    send_lv.FromEmail = tEmail;
    send_lv.Subject = tSubject;
    send_lv.Comments = tMsg;
    send_lv.Newsletter = tCheckBox;
    send_lv.status = "";
    send_lv.sendAndLoad("php/sendContact.php",result_lv,"POST");
    this.showAlertMsg("Sending...");
    Everything gets sent and all is working great. The only thing
    that does not work is the ifStatement in the result_lv never gets
    triggered. I think that this has to do with my php. I don't really
    speak php and so I am having issues with it.
    In the php I have two echos, which I was told I could use
    with the result_lv. I think that my result_lv, does either not know
    what it is listening to, or that my echos are wrong. The echos in
    the php look like this.
    //if($debug)
    echo "mes1 $ToEmailType $ToEmail $Subject $Message From:
    $Name $FromEmail\n ";
    and
    echo "&Status=Your quote request has been sent.";
    What do I have to do, so Flash receives the echo and I can
    tell the user that the info has been received.
    Thanks a lot for help with this!

    OK, great, I am getting closer! Thank you so much.
    I now get the "Email did not go through" case. The email gets
    sent though, so I am not sure why that is happening. I am assuming,
    where you say //find out if it's working first is working because
    the if statement gets triggered.
    How can I proceed from here?
    Thank you so much!

  • Dreamweaver newbie - php & mysql help

    hi,
    new to dremweaver, have used .net in past with vwd and found it straight forward to drag over grid view etc to view data from sql database.
    i want to use php and mysql now and looking at dreameaver cs4 i really want to know what each navigation is. i.e. how do i create my mysql database and drag say a grid view in dreamweaver cs4 over to view?
    basically just need to know the basics navigation of what buttons i need for to interact using php and mysql?
    any help would be great, and also if anyone can recommend a good book on php/mysql with dreamweaver cs4 as a by the by then would greatly appreciate it.
    many thanks
    andy

    Take a look at this book:
    http://www.amazon.com/Essential-Guide-Dreamweaver-Ajax-Essentials/dp/1430216107
    I didn't read it, but I am currently reading the author's another book (David Powers: PHP Object-Oriented Solutions) and he is good.
    David is also a community expert on these forums.

  • DataGrid + .PHP + mySQL Help

    I have searched all over for information on how to load data
    from mySQL in a DataGrid with AS3.
    My mySQL database only has three fields; ID, Name, Kind
    Thanks in advance for your help.

    http://www.flash-db.com/Tutorials/helloAS3/helloAS3.php?page=1
    This is a pretty good, start-to-finish, example of how to get
    data from MySQL/PHP (as well as working with other forms of data)
    to Flash AS3 and how to manipulate it. Now,...I don't think it
    covers DataGrid, but you can probably read through it and get a
    good idea of what to do. If you still have questions, after you
    read it, post back here.

  • IWeb website functionality (PHP/HTML) help. Please, anyone?

    I used to use the gosh-awful Word-Press and now i switched to iWeb '09, it's pretty easy to design the site, but how do I make it actually work, i.e. such that site users can type in fields, click on stuff that will link them to other stuff...basically, how do I give the website any kind of functionality? Right now, it's just a dud, as in you go on there and you can't click on anything or what not (other than the widgets that come with the site). Do I need to do PHP or HTML to do this? Please help.
    P.S. I'm not s computer scientist, so please respond as if I were a 5th grader : )

    Website forms require a script on your server. You can't do this if you publish to MobileMe.
    Some info here......
    http://www.iwebformusicians.com/Tricks/Forms.html
    .... and a couple of suggestions for alternatives if you publish to MobileMe near the bottom of the page.
    There's a lot of stuff about HTML around......
    http://www.w3schools.com/html/html_forms.asp
    A search of this form should reveal a lot if stuff about iFrames and embedding music, movies etc.
    Here's an example of a flash banner in an iWeb page....
    http://www.iwebformusicians.com/Tricks/PhotoMediaSatellite.html
    "I may receive some form of compensation, financial or otherwise, from my recommendation or link."

  • Embedded Flash in PHP - Need help!

    Hello everyone!
    We're having problems embedding Flash-files into our .php-files, so I thought the best place to ask for help would be the official Flash-forums :-) First of all, I'll let you know what exactly we're doing....
    We have a few flash-files which you should only be allowed to view once you're logged in and authenticated to our "portal". You can only view those files over some sort of JavaScript-Popup-Flashplayer thing (personally not too much into JS). The JS-Player requires the flash-files to be available over an exisiting URL (such as http://page.domain/flash/file.swf) - And this is where the whole problem begins...
    After hours of research and conversing with my collegues and the project-management, we decided to use the following technique to still keep those URLs for the JS-Player while preventing the user from simply accessing our "top secret flash movies" by typing in the URL in their browser...
    We move the Flash-folder to a location outside of our document root -> Flash-files can't be randomly accessed or downloaded via the URL.
    We use an Apache-plugin called "mod_rewrite" to rewrite/redirect URLs that look similar to http://page.domain/flash/*.swf to a PHP-file -> We can work with REQUEST_URI to see which flash-file the user wanted to view. Now, inside that PHP file we check wether the user is authenticated or not and either embed the flash-file into the PHP-file or redirect him to an error-page. In theory, the user could still view the flash-file over the URL (without even noticing PHP, since the URL stays http://page.domain/flash/file.swf, hence a perfect fake, no? ;-) ) and everything actually works exactly the way we wanted..........IN FIREFOX!
    Now we went live with our application and we had to realise that one of the only things we haven't tested in other browsers (this being one of them) don't work the way we want and instead of viewing/playing the film, we get to see a white window in the JS-Player, while it's trying to download a file called "filename_swf" (underscore instead of dot?) when you access the movie over the URL (http://page.domain/flash/file.swf).
    How we embed Flash into PHP:
    Headers + outputting the flash-files content....
    header('Content-Type: application/x-shockwave-flash');
    header('Expires: Thu, 01 Jan 1970 00:00:00 GMT, -1');
    header('Cache-Control: no-cache, no-store, must-revalidate');
    header('Pragma: no-cache');
    echo file_get_contents($request);
    As I said, this works just fine in Firefox, however we're sure most of our users will be using IE, in which it doesn't work at all. I personally believe we're missing some sort of header or we have to set a different header depending on the browser...so I thought the best place to ask about Flash Headers would be the actual flash forums. Maybe I'm even totally wrong and missing out something crucial and someone can point me in the right direction...
    Thanks!

    Thank you for your help.
    I have uploaded the skin to the same directory as the video.
    It's now showing. Do I have to reference it on the code?
    http://www.custommlmleads.com/test.html
    skin :
    http://www.custommlmleads.com/VIDEO/SkinUnderPlaySeekStop.swf
    Thank you

  • PHP error help needed

    I've worked through the Adobe tutorial, "Developing a web
    application with
    Dreamweaver"
    http://www.adobe.com/devnet/dreamweaver/articles/develop_web_application.html).
    Everything works fine until I get to the final step of
    testing the Record
    Insert form be submitting data. When I click the Insert
    record button
    instead of going to the View page I get these errors for each
    form field:
    Warning: mysql_real_escape_string()
    [function.mysql-real-escape-string]:
    Access denied for user 'ODBC'@'localhost' (using password:
    NO) in
    F:\Webs\cafe_php\TMPh4f4n13a5b.php on line 8
    Warning: mysql_real_escape_string()
    [function.mysql-real-escape-string]: A
    link to the server could not be established in
    F:\Webs\cafe_php\TMPh4f4n13a5b.php on line 8
    The warnings appear on the form page above the page itself.
    When I connected the database to the site the test worked.
    Here are the first 8 lines of code:
    <?php require_once('Connections/connTownsend.php'); ?>
    <?php
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType,
    $theDefinedValue = "",
    $theNotDefinedValue = "")
    $theValue = get_magic_quotes_gpc() ? stripslashes($theValue)
    : $theValue;
    $theValue = function_exists("mysql_real_escape_string") ?
    mysql_real_escape_string($theValue) :
    mysql_escape_string($theValue);
    Any suggestions?
    Walt

    First, thanks for helping.
    2nd, sorry to be so thick, this is all still Greek to me, but
    I have no idea
    where to insert
    with a die($rsInsert_query):
    Here is all the PHP code above the DOCTYPE:
    <?php require_once('Connections/connTownsend.php'); ?>
    <?php
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType,
    $theDefinedValue = "",
    $theNotDefinedValue = "")
    $theValue = get_magic_quotes_gpc() ? stripslashes($theValue)
    : $theValue;
    $theValue = function_exists("mysql_real_escape_string") ?
    mysql_real_escape_string($theValue) :
    mysql_escape_string($theValue);
    switch ($theType) {
    case "text":
    $theValue = ($theValue != "") ? "'" . $theValue . "'" :
    "NULL";
    break;
    case "long":
    case "int":
    $theValue = ($theValue != "") ? intval($theValue) : "NULL";
    break;
    case "double":
    $theValue = ($theValue != "") ? "'" . doubleval($theValue) .
    "NULL";
    break;
    case "date":
    $theValue = ($theValue != "") ? "'" . $theValue . "'" :
    "NULL";
    break;
    case "defined":
    $theValue = ($theValue != "") ? $theDefinedValue :
    $theNotDefinedValue;
    break;
    return $theValue;
    $editFormAction = $_SERVER['PHP_SELF'];
    if (isset($_SERVER['QUERY_STRING'])) {
    $editFormAction .= "?" .
    htmlentities($_SERVER['QUERY_STRING']);
    if ((isset($_POST["MM_insert"])) &&
    ($_POST["MM_insert"] == "form1")) {
    $insertSQL = sprintf("INSERT INTO comments (FIRST_NAME,
    LAST_NAME) VALUES
    (%s, %s)",
    GetSQLValueString($_POST['FIRST_NAME'], "text"),
    GetSQLValueString($_POST['LAST_NAME'], "text"));
    mysql_select_db($database_connTownsend, $connTownsend);
    $Result1 = mysql_query($insertSQL, $connTownsend) or
    die(mysql_error());
    ?>
    Walt
    "Murray *ACE*" <[email protected]> wrote
    in message
    news:[email protected]...
    > Walt - this is a good puzzle.
    >
    > All of your observations suggest that you have adequate
    permissions, yet,
    > this error says you don't -
    >
    >> Warning: mysql_real_escape_string()
    [function.mysql-real-escape-string]:
    >> A link to the server could not be established in
    >> F:\Webs\GoFreeFuel\TMP4r8sq1dpfl.php on line 8
    >
    > Let's take a look at your insert command - can you trap
    the insert process
    > with a die($rsInsert_query) command, right before the
    actually execution?
    >
    > --
    > Murray --- ICQ 71997575
    > Adobe Community Expert
    > (If you *MUST* email me, don't LAUGH when you do so!)
    > ==================
    >
    http://www.dreamweavermx-templates.com
    - Template Triage!
    >
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    >
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    >
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    > ==================
    >
    >
    > "Walt F. Schaefer" <[email protected]> wrote
    in message
    > news:[email protected]...
    >> Murray,
    >>
    >> Here's an Update/Summary:
    >>
    >> 1. I have a MySQL database (localhost) I can see and
    manipulate via
    >> Navicat
    >> 2. In my site (in DW) I created a connection to that
    database. It tested
    >> successfully.
    >> 3. I created a recordset using that database. It
    tested successfully.
    >> 4. On a new page Insert > Application Objects
    > Insert Record > Record
    >> Insertion Form Wizard.
    >> 5. Save page and preview locally in IE6.
    >> 6. Input info in form and click Insert record.
    >> 7. Record IS added to table but every field is Null.
    >> 8. Errors for each form field:
    >> Warning: mysql_real_escape_string()
    [function.mysql-real-escape-string]:
    >> Access denied for user 'ODBC'@'localhost' (using
    password: NO) in
    >> F:\Webs\GoFreeFuel\TMP4r8sq1dpfl.php on line 8
    >>
    >> Warning: mysql_real_escape_string()
    [function.mysql-real-escape-string]:
    >> A link to the server could not be established in
    >> F:\Webs\GoFreeFuel\TMP4r8sq1dpfl.php on line 8
    >>
    >> As I can read from the database/table and the Insert
    record form DOES ADD
    >> a record it would seem I am connected to the db just
    unable to add data.
    >>
    >> What have I done wrong?
    >>
    >> Thanks.
    >> --
    >>
    >> Walt
    >>
    >>
    >> "Murray *ACE*"
    <[email protected]> wrote in message
    >> news:[email protected]...
    >>> OK - I think we will have to solve your database
    connectivity issues
    >>> first. What does your Connections file look
    like?
    >>>
    >>> --
    >>> Murray --- ICQ 71997575
    >>> Adobe Community Expert
    >>> (If you *MUST* email me, don't LAUGH when you do
    so!)
    >>> ==================
    >>>
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    >>>
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    >>> ==================
    >>>
    >>>
    >>> "Walt F. Schaefer" <[email protected]>
    wrote in message
    >>> news:[email protected]...
    >>>>> LOL - you are interpreting my code MUCH
    too literally. Change this -
    >>>> It's only because I don't have a clue. Hence
    the need to use this
    >>>> beginner's tutorial.
    >>>>
    >>>> I replaced to code as instructed. No
    improvement. Error messages:
    >>>>
    >>>> Warning: mysql_real_escape_string()
    >>>> [function.mysql-real-escape-string]: Access
    denied for user
    >>>> 'ODBC'@'localhost' (using password: NO) in
    >>>> F:\Webs\cafe_php\TMPgayzl14jqr.php on line 8
    >>>>
    >>>> Warning: mysql_real_escape_string()
    >>>> [function.mysql-real-escape-string]: A link
    to the server could not be
    >>>> established in
    F:\Webs\cafe_php\TMPgayzl14jqr.php on line 8
    >>>>
    >>>> Warning: mysql_real_escape_string()
    >>>> [function.mysql-real-escape-string]: Access
    denied for user
    >>>> 'ODBC'@'localhost' (using password: NO) in
    >>>> F:\Webs\cafe_php\TMPgayzl14jqr.php on line 8
    >>>>
    >>>> Warning: mysql_real_escape_string()
    >>>> [function.mysql-real-escape-string]: A link
    to the server could not be
    >>>> established in
    F:\Webs\cafe_php\TMPgayzl14jqr.php on line 8
    >>>> INSERT INTO comments (FIRST_NAME, LAST_NAME)
    VALUES (NULL, NULL)
    >>>> --
    >>>>
    >>>> Walt
    >>>>
    >>>>
    >>>> "Murray *ACE*"
    <[email protected]> wrote in message
    >>>> news:[email protected]...
    >>>>> LOL - you are interpreting my code MUCH
    too literally. Change this -
    >>>>>
    >>>>> $insertSQL = sprintf("INSERT INTO
    comments (FIRST_NAME, LAST_NAME)
    >>>>> VALUES
    >>>>> (%s, %s)",
    >>>>> GetSQLValueString($_POST['FIRST_NAME'],
    "text"),
    >>>>> GetSQLValueString($_POST['LAST_NAME'],
    "text"));
    >>>>> $insert_rsEmails = sprintf("INSERT INTO
    tblcontactdata SET emailValue
    >>>>> =
    >>>>> %s", GetSQLValueString($filter_rsEmails,
    "text"));
    >>>>> die($insert_rsEmails);
    >>>>> $rsEmails =
    mysql_query($insert_rsEmails, $selectData) or
    >>>>> die(mysql_error()); // insert this email
    into the database
    >>>>>
    >>>>> mysql_select_db($database_connTownsend,
    $connTownsend);
    >>>>>
    >>>>> to this -
    >>>>>
    >>>>> $insertSQL = sprintf("INSERT INTO
    comments (FIRST_NAME, LAST_NAME)
    >>>>> VALUES
    >>>>> (%s, %s)",
    >>>>> GetSQLValueString($_POST['FIRST_NAME'],
    "text"),
    >>>>> GetSQLValueString($_POST['LAST_NAME'],
    "text"));
    >>>>> die($insertSQL);
    >>>>>
    >>>>> mysql_select_db($database_connTownsend,
    $connTownsend);
    >>>>>
    >>>>>
    >>>>> --
    >>>>> Murray --- ICQ 71997575
    >>>>> Adobe Community Expert
    >>>>> (If you *MUST* email me, don't LAUGH
    when you do so!)
    >>>>> ==================
    >>>>>
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    >>>>>
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    >>>>> ==================
    >>>>>
    >>>>>
    >>>>> "Walt F. Schaefer"
    <[email protected]> wrote in message
    >>>>>
    news:[email protected]...
    >>>>>> Murray,
    >>>>>>
    >>>>>> Here's all the PHP code that
    precedes the DOCTYPE *after* inserting
    >>>>>> the code you provided:
    >>>>>>
    >>>>>
    >>>>
    >>>>
    >>>
    >>
    >>
    >

Maybe you are looking for