Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 7 of 7
  1. #1
    Junior Member
    Join Date
    Jul 2014
    Posts
    3
    Member #
    39638

    Help with coda2 PHP MAMP triangle

    Hello, my name is Ongun. I just joined to community.

    I am building a contact form. I downloaded MAMP. to test my PHP code. i do not know the rest I follow the instructions online. I copied my all files related to my site into htdoc in MAMP. but it does not work, I also added

    PHP Code:
    $link mysql_connect('localhost''root''root'); 
    in the video that i found when i copy my files there is a green light on side bar showing that i am connected , but also it does not work as well. Probably I have a small error that I did not do. PLease help me Thank you.

  2.  

  3. #2
    Senior Member Ronald Roe's Avatar
    Join Date
    Mar 2011
    Location
    Oklahoma City
    Posts
    3,141
    Member #
    27197
    Liked
    959 times
    Well, we need to answer the obvious question first:

    Did you create an actual database in MySQL?

    If you have, you'll need to add the database's name as the fourth parameter in the connect function.
    Ron Roe
    Web Developer
    "If every app were designed using the same design template, oh wait...Bootstrap."

  4. #3
    Junior Member
    Join Date
    Jul 2014
    Posts
    3
    Member #
    39638
    Do I need a database for contact form? I thought it directly sends email to me :/

  5. #4
    Senior Member Ronald Roe's Avatar
    Join Date
    Mar 2011
    Location
    Oklahoma City
    Posts
    3,141
    Member #
    27197
    Liked
    959 times
    Then you can completely remove all of that from your code and not even worry about what the MySQL server is doing.
    Ron Roe
    Web Developer
    "If every app were designed using the same design template, oh wait...Bootstrap."

  6. #5
    Junior Member
    Join Date
    Jul 2014
    Posts
    3
    Member #
    39638
    but,whenever I try to run code it gives text of the code. I googled and i downloaded MAMP. to see if it is working or nor

  7. #6
    Junior Member
    Join Date
    Jul 2014
    Posts
    9
    Member #
    39651
    Liked
    1 times
    One simple question.
    Did you insert the mentioned text between <?php and ?> ?
    It will be better if you attached your page here.

    Sent from my Nokia_XL
    Last edited by vishalbiswas; Jul 19th, 2014 at 09:16 PM.

  8. #7
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,686
    Member #
    5580
    Liked
    716 times
    Do this simple test to make sure PHP is being processed.

    Use notepad or some simple text editor,
    copy the code below, save it on your computer as "test.php",
    upload it to your website and run it. See what happens.

    PHP Code:
    <?php
    $today
    =date('M d, Y');
    echo 
    "The date today is: ".$today;
    ?>



Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 05:02 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com