A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: PHP or ASP - Simple Program question

  1. #1
    Getting Better With Time
    Join Date
    Jun 2001
    Location
    Canada
    Posts
    54

    PHP or ASP - Simple Program question

    Hello there,

    I am currently running Dreamweaver Mx 2004, and on occassion, I make forms with the program. In doing so, I need to be able to use php or asp etc. to have the form work.

    I am wondering if Dreamweaver can develop the php file needed to process the form as data is submitted by a user. I have not found any info on this feature and therefore believe that it does not do this, so please correct me if I am wrong.

    If dreamweaver can't do this, can anyone recommend a good program that will help create the files that will process the data submitted/collected from a form. This will hopefully save me hours and hours of trying to manipulate existing codes to do what it is that I need it to do.

    Thanks for your time,

    Greg
    ____________________________
    Greg White
    http://www.prestigeinteractive.com

  2. #2
    up to my .as in code Chris_Seahorn's Avatar
    Join Date
    Dec 2004
    Posts
    4,389
    Dreamweaver is a php machine.

    You need to define your recordsets (once you define a database connection...it will prompt when needed) and then when you place form objects in a page you can tap into the recordsets from any properties window.

    With 3rd party extensions...dreamweaver can do anything.

  3. #3
    Getting Better With Time
    Join Date
    Jun 2001
    Location
    Canada
    Posts
    54

    PHP Forms in Dreamweaver continued

    Thanks Chris,

    If you have a second, I am not sure how I go about defining my recordsets. If you could show me a short example of something you've made, I'd be greatly appreciative.

    Here is a quick one you could comment on.

    __________________________________________________ _______

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </head>

    <body>

    <form action="postemail.php" method="post" name="sample">
    <input name="name1" id="name1" type="text" size="50" maxlength="100" value="Name">
    <br>
    <br>
    <input name="email" id="email" type="text" size="50" maxlength="100" value="Email">
    <br>
    <br>
    <textarea name="comments1" id="comments1" cols="50" rows="5" >
    </textarea>
    <br>
    <br>
    <input type="submit" value="Submit">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ;&nbsp; <input type="reset" value="Reset">
    </form>

    </body>
    </html>


    __________________________________________________ _______

    Thanks for your time,

    Greg
    ____________________________
    Greg White
    http://www.prestigeinteractive.com

  4. #4
    up to my .as in code Chris_Seahorn's Avatar
    Join Date
    Dec 2004
    Posts
    4,389
    Well, something like this doesn't need a recordset since you do not query a database before or after. If you ever need to setup one, use the Server Behaviors panel when you have an ASP or PHP page.

    For your contact form, the simplest postemail.php you could tie it to is:

    <?
    // never, ever trust user input....always apply some sort of POST security!!
    if(get_magic_quotes_gpc())
    {
    $_POST["name1"] = stripslashes($_POST["name1"]);
    $_POST["email"] = stripslashes($_POST["email"]);
    $_POST["comment1"] = stripslashes($_POST["comment1"]);

    }

    $email = $_POST["email"];
    $name = $_POST["name1"];
    $comment = $_POST["comment1"];
    $mymail = "yourmail@yourhost.com";




    mail ("$mymail" , "Message from $name", "$comment", "FROM: $name<$email>");


    ?>

    This is as basic as it gets.


    You'll also notice most php posted in flash forums dealing with say MySQL looks nothing like a page dreamweaver creates. This is because while dreamweaver will completely setup great pages for php,html,asp and etc that allows you to flip through recordsets and that type of thing...it doesn't exactly setup great php pages for flash use where we need variables sent out a specific way. This may not apply to you as this email form is html based, and I only mention it to help you understand almost all flashers who use dynamic data write their own backsides.

    That email form you posted, could be completely written for you using some of the many extensions available for Dreamweaver and it would have written the backside as well. Search google for Dreamweaver extensions and you may be surprised at what you can do using extensions.

    Hope I didnt bore you.

    Chris

  5. #5
    Getting Better With Time
    Join Date
    Jun 2001
    Location
    Canada
    Posts
    54

    Thanks a lot for your help...

    Hey Chris,
    Thanks again for your help. I really appreciate it. I love to work with flash, setting up pages in html is not a problem either, but generating the backend to forms really kills me...hehehe...I guess I should take a course or something on that. Anyways, thanks for your help, and I hope you have a great day.
    Take care <><
    Greg
    ____________________________
    Greg White
    http://www.prestigeinteractive.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center