Jump to content

purdles

New Members
  • Posts

    6
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

purdles's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi, I am building a searchable web directory for local businesses.  What I plan to do is put in all of the basic information myself so its like a free basic listing - you're already listed.  But if you want to upgrade to add other features to your listing (like map, prices, etc.) then you pay a fee and choose the things you want to add.  I figure, there'll be simple icon choices and fields for you to fill out to add the additional information, and an upload field to upload your files.  What kind of PHP script should I use to do this?  Something really simple to use and configure as I'm still a beginner to PHP. At first I was going to stick to HTML and just let people order an upgrade and submit a form to me, and I manually do their upgrade, but then I couldn't make it searchable. Thanks for all suggestions!
  2. I am looking for an easy easy supereasy  ;D PHP calendar script - what I want is one of those tiny sidebar calendars that you see on blogs like Wordpress.  One that I can easily install to an HTML page AND one that I can add events to.  I found a few but they were strictly calendars.  What we want is a birthday calendar so people can easily see that, hey, today's date is highlighted so there's members' birthdays there - click on it or hover over the date and you see a little list of the birthday people.  That's why I need to be able to add events. Any ideas? Is there something out there like this, or am I dreaming?  Or is PHP not the answer?  I found a couple of JS ones but they seemed too complicated to maintain, esp adding events. Oh, did I mention that I prefer free or extremely cheap?  ;D
  3. That was definitely it, it needed to be a PHP page also, the HTML was throwing it off.  So you can't include PHP in an HTML page?  I'm so happy because I sat here all day typing and configuring quotes (removing all those little ' and - ::) ) and if the script didn't work I was going to cry. Literally.  ;D Thanks SOOOOO much everybody!  I appreciate all of your input!
  4. Sorry!  I fixed that above. Yes, if I type it in directly, the quote script runs just fine.
  5. This is quotes.php: [code] <style type="text/css"> <!-- .style1 { font-family: Arial, Helvetica, sans-serif; font-size: 12px; font-weight: bold; color: #E5E6E7; } .style2 { font-family: Arial, Helvetica, sans-serif; font-size: 12px; font-style: italic; color: #E5E6E7; } --> </style> </head> <body bgcolor="#696d71"> <img src="images/tip.gif" >&nbsp;&nbsp;<span class="style1">Quote of the day - <?php echo date("F jS, Y"); ?></span> <table border="0" cellpadding="6" width="40%" cellspacing="0">   <tr>     <td width="100%" class="style2"><code>     <?php // ***************************************************************************** //  -------"The World's simplest PHP Message/Quote of the Day Script"---------- // // Author: Mads Søgaard (mads@acm.org) // Homepage: http://www.emacs.dk/quote/ // Version: 1.0 // // // ***************************************************************************** // -------------------- Description -------------------------------------------- // // "The World's simplest PHP Message/Quote of the Day Script" is a simple // "quote-of-the-day script" that needs access to a MySQL database. It only // consists of one script that's SIMPLE and hence easy to customize. This is how // it works: You put any number of quotes/messages/whatever into the database, // and then the script will show one quote every day. When all quotes have been // shown, the script starts from the beginning of the quotes again. And if your // quote-of-the-day page doesn't receive any visitors on a given day, the given // quote-of-the-day will be shown the next day too. It simple, yet smart. // // // ***************************************************************************** // -------------------- Installation -------------------------------------------- // 1. Upload the quote.php to your web server. // 2. Change the following variables $DB_SERVER,$DB_USER, $DB_PASS, $DB_NAME // (see below) // 3. Create the needed tables in your database with the quotes.sql file. // You can do it from the prompt (mysql -u[username] [-p] [database] < quotes.sql) // or you can use the wonderful phpMyAdmin at http://www.phpwizard.net/projects/phpMyAdmin/ // 4. Point your browser to http://yourdomain/quotes.php // 5. Add your own quotes to the database and custumize the script as you see fit. // // ***************************************************************************** // -------------------- Do you find this script useful? ------------------------ // // Then by all means recommend it to other people! Or link back to me from your // homepage (that would be greatly appreciated) // You can also review my script and give it good grades at: // http://www.hotscripts.com/PHP/Scripts_and_Programs/Quote_Display/ // (or anywhere else you may have found it) // // ****************************************************************************** // **************************************** // Fill in your database information below // **************************************** $DB_SERVER = "mysql"; $DB_USER = "name"; $DB_PASS = "pwd"; $DB_NAME = "quotes"; // **************************************** // **************************************** // you do NOT have to edit below this line // **************************************** $con = mysql_connect($DB_SERVER, $DB_USER, $DB_PASS); mysql_select_db($DB_NAME); $getNoOfQuotesQuery = mysql_query("select count(*) from quotes", $con); $no_of_quotes = mysql_result($getNoOfQuotesQuery,0); $getMetaDataQuery = mysql_query("SELECT * FROM quotes_meta", $con); $row = mysql_fetch_row($getMetaDataQuery); $number_reached = $row[1]; $date_modified= $row[2]; // get the current day of the month (from 1 to 31) $day_today = date("j"); if ($date_modified != $day_today){ // we have reached the end of the quotes if ($number_reached >($no_of_quotes - 1)){ $number_reached = 1; $query3 = mysql_query('UPDATE quotes_meta SET date_modified = "'.$day_today.'", number_reached = "'.$number_reached.'"', $con); mysql_query($query3,$con); } else { // we haven't reached the end of the quotes // therefore we increment $number_reached $number_reached = $number_reached + 1; $query3 = mysql_query('UPDATE quotes_meta SET date_modified = "'.$day_today.'", number_reached = "'.$number_reached.'"', $con); mysql_query($query3,$con); } } // we get the quote with 'id = $number_reached' from the database $getQuoteQuery = mysql_query("SELECT quote,author FROM quotes WHERE id = ".$number_reached, $con); $row = mysql_fetch_row($getQuoteQuery); // we print the quote ($row[0]) and the author ($row[0]) echo $row[0]."<p align='right'><i>~ " . $row[1]; // close the database connection mysql_close($con); ?> </i></code></td>   </tr> </table> <p>&nbsp;</p> </body> </html> [/code] ************************* Then there's an SQL file that goes with it....
  6. Hi, new here. :D And new to PHP but I have already installed a few scripts very successfully. I am trying to get a Quote of the Day script to work properly, using the include function.  The script works fine on its own, I followed the instructions and if I type it in the browser, it displays.  Itdid not come with any directions on running it inside of an HTML page, which is what I need to do, so I just typed in <?php include("quotes.php"); ?>, but nothing shows up at all.  The php file is located in the same directory as the html file, from what i can see, it all looks set up right.  Like I said, it works fine if I direct browse to it. Any ideas on how to fix this?  I appreciate all help!
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.