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.

Page 1 of 4 1 2 3 ... LastLast
Results 1 to 10 of 36
  1. #1
    Senior Member -chris-'s Avatar
    Join Date
    Apr 2006
    Location
    SK
    Posts
    1,205
    Member #
    13102
    A client purchased a template (against my suggestion), which has a calendar feature on most of the pages. She wants visitors to the site to be able to use this to see when she is in their area for events. I have the MySQL database, and tables set up (via PHP MyAdmin), but don't know how to get the search form to actually look at the database for the entries. I have a test entry set up already, but can't do anything with it because I don't know how to get the form to access the database.
    Portfolio | Blog | Twitter

    Was my post, or someone elses, helpful? Click the thumbs up to let everyone know!

  2.  

  3. #2
    WDF Staff smoseley's Avatar
    Join Date
    Mar 2003
    Location
    Boston, MA
    Posts
    9,729
    Member #
    819
    Liked
    205 times
    Upload all the PHP and MySQL code that you have... that'll be a good start to diagnosing the problem.

  4. #3
    Senior Member -chris-'s Avatar
    Join Date
    Apr 2006
    Location
    SK
    Posts
    1,205
    Member #
    13102
    Quote Originally Posted by transio
    Upload all the PHP and MySQL code that you have... that'll be a good start to diagnosing the problem.
    This is all that I have. It isn't much beyond what was included beyond the template.

    Thanks in advance for helping.
    Portfolio | Blog | Twitter

    Was my post, or someone elses, helpful? Click the thumbs up to let everyone know!

  5. #4
    Junior Member
    Join Date
    Jun 2007
    Location
    Los Angeles
    Posts
    25
    Member #
    15371
    In order to do what you want to do, you're going to need to use a server-side scripting language such as PHP, which works so well with MySQL. You cannot do this with HTML alone.

  6. #5
    Senior Member -chris-'s Avatar
    Join Date
    Apr 2006
    Location
    SK
    Posts
    1,205
    Member #
    13102
    Thanks, I know that much. I just have no idea where to start. If she had a Window's hosting plan, I could use ASP, but she has a Linux host, so I have to use PHP.
    Portfolio | Blog | Twitter

    Was my post, or someone elses, helpful? Click the thumbs up to let everyone know!

  7. #6
    Senior Member
    Join Date
    Jun 2005
    Location
    Atlanta, GA
    Posts
    4,146
    Member #
    10263
    Liked
    1 times
    Wait.. But it looks like that calendar doesn't have any PHP in it... Are you saying you're trying to use the PHP to get some info into the calendar? If so, you'll want to look at:
    [phpfunction]mysql_connect[/phpfunction]
    [phpfunction]mysql_query[/phpfunction]
    [phpfunction]mysql_fetch_array[/phpfunction]

    Is this just a PHP issue, or do you also not know how to go about using SQL to get the results you need?

  8. #7
    Senior Member -chris-'s Avatar
    Join Date
    Apr 2006
    Location
    SK
    Posts
    1,205
    Member #
    13102
    Im starting at square one. Do you know of any tutorials that would help with this specific task?

    Thanks again.
    Portfolio | Blog | Twitter

    Was my post, or someone elses, helpful? Click the thumbs up to let everyone know!

  9. #8
    Junior Member
    Join Date
    Jun 2007
    Location
    Los Angeles
    Posts
    25
    Member #
    15371
    His HTML code contains one php script: events.php
    I assume this is where the calendar database access happens, so from what I can determine, this is a PHP MySQL access issue. Therefore, he has to 'hook' up the calendar functionality he wants using PHP - either the events.php script or a new one when the form loads.

  10. #9
    Senior Member -chris-'s Avatar
    Join Date
    Apr 2006
    Location
    SK
    Posts
    1,205
    Member #
    13102
    Quote Originally Posted by -chris-
    Sorry, I forgot to post the events.php. It deals with the connection. I don't know if it is right though.

    PHP Code:
    <?php
    # FileName="Connection_php_mysql.htm"
    # Type="MYSQL"
    # HTTP="true"
    $hostname_events "localhost";
    $database_events "*DB NAME*";
    $username_events "*DB USERNAME*";
    $password_events "*DB PASSWORD*";
    $events mysql_pconnect($hostname_events$username_events$password_events) or trigger_error(mysql_error(),E_USER_ERROR); 
    ?>
    Sorry, again, I found a mistake with the original file. The path for events.php is wrong. Attached is the updated file.
    Portfolio | Blog | Twitter

    Was my post, or someone elses, helpful? Click the thumbs up to let everyone know!

  11. #10
    Junior Member
    Join Date
    Jun 2007
    Location
    Los Angeles
    Posts
    25
    Member #
    15371
    That connection php looks correct - obviously you will insert the actual connection parameters - have you tried this code to see if it actually works?
    Assuming it does:
    The next step after you make connection with the MySQ DB is to formulate a SQL query string to fetch whatever calendar data you want from the DB. Do you know what data you want?


Page 1 of 4 1 2 3 ... LastLast

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 04:23 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com