Jump to content

tommr

Members
  • Posts

    43
  • Joined

  • Last visited

Contact Methods

  • Website URL
    http://artsandcraftsnetwork.com

Profile Information

  • Gender
    Not Telling

tommr's Achievements

Member

Member (2/5)

0

Reputation

  1. I have a script that is a collection of code and pieces and parts to keep track of arts and show listings. I would like the script to send me an email when a new user registers or when a show is listed.
  2. I have a php code that uses a database to keep track of events. It is made up of a number of pages and is up and running on my site. http://www.artsandcraftsnetwork.com/shows/ I would like to find out how much it would cost to convert this to a wordpress plugin that would work with other plugins like membership plugins. Or even make it so I can integrate it into a wordpress with tags. thanks
  3. I am looking for a javascript that will display a field name in a field box and when the box is clicked the field name dims and when the typing begins the name disappears entirely. Like this site when you go to enter the contest.. www.lightandfit.com thanks, tom
  4. I have a form that sends the user info to a database. One field it URL People are entering the url with out the http:// and when they do the script puts my domain infront of the www. Is there a way to preload the form imput field with the http:// or is there a way to strip my url from the results.
  5. I was getting help with my script and I just noticed this was added. What does it mean? /*** a rfc compliant web address ***/ $url = "http://www.phpro.org"; /*** try to validate the URL ***/ if(filter_var($url, FILTER_VALIDATE_URL) === FALSE) { /*** if there is no match ***/ echo "Sorry, $url is not valid!"; } else { /*** if we match the pattern ***/ echo "The URL, $url is valid!<br />"; }
  6. Can anyone please help me with my code. I would like to display the data from another column instead of the id in the url generated by the scirpt. <?php include('/home/arts/public_html/shows/includes/config.db.php'); if ($link){ $rpp = 10; // results per page $adjacents = 4; $page = intval($_GET["page"]); if(!$page) $page = 1; $reload = $_SERVER['PHP_SELF']; $sql = "select * from craft_shows WHERE venue_state='MD' order by start_date "; $result = mysql_query($sql) or die(mysql_error()); // count total number of appropriate listings: $tcount = mysql_num_rows($result); $date = strftime("%b %d, %Y", strtotime($row['start_date'])); echo "<table class='table7' width='100%' cellpadding='5' cellspacing='1'>"; echo "<tr><td> </td><td>Date</td><td>City</td><td>Show Name</td><td>Attendance</td></tr>"; echo "<tr><td colspan='7'><hr></td></tr>"; // count number of pages: $tpages = ($tcount) ? ceil($tcount/$rpp) : 1; // total pages, last page number $date = strftime("%b %d, %Y", strtotime($row['start_date'])); $count = 0; $i = ($page-1)*$rpp; while(($count<$rpp) && ($i<$tcount)) { mysql_data_seek($result,$i); $row = mysql_fetch_array($result); $id = $row['id']; echo "<tr><td>"; echo "<a href=\"/show_submits/show_detail.php?id=$id\">Details</a>"; echo "</td><td>"; echo strftime('%b %d, %Y', strtotime($row['start_date'])); echo "</td><td>"; echo $row['venue_city']; echo "</td><td>"; echo $row['show_name']; echo "</td><td>"; echo $row['num_visitors']; echo "</td></tr>"; $i++; $count++; } echo "</table>"; echo "<br>"; // call pagination function: include("pagination1.php"); echo paginate_one($reload, $page, $tpages, $adjacents); } ?>
  7. That does not seem to be working either. I sent an email to the host tech. They said it was working at their end but I tested it with numerous browsers to no avail. I even called a friend who had never loaded the site and it would not work for him. I think I really would like the page to load with the show name instead of the id from the database but this may not be a mod rewrite issue.
  8. <?php include('../show_submits/includes/config.db.php'); if ($link) { if ($_GET["id"]) { $id = $_GET["id"]; $sql = "select * from craft_shows where id = $id"; if (!empty($row['website'])) if (!empty($row['email'])) $electricity = $row['electricity']; if ($electricity == "1") { $answer = "yes"; } else { $answer = "no"; } $acceptance_criteria = $row['acceptance_criteria']; if ($acceptance_criteria == "1") { $answer1 = "yes"; } else { $answer1 = "no"; } $setup_loc = $row['setup_loc']; if ($setup_loc == "2") { $answer2 = "In and Outdoors"; } elseif ($setup_loc == "1") { $answer2 = "Outdoors"; } else { $answer2 = "Indoors"; } $wares_ac = $row['wares_ac']; if ($wares_ac == "2") { $answer3 = "Buyer/Wholesale and Retail"; } elseif ($wares_ac == "1") { $answer3 = "Retail"; } else { $answer3 = "Retail - Open to general public"; } $result = mysql_query($sql) or die(mysql_error()); $row = mysql_fetch_array($result); echo "<table class='table9'>"; echo "<tr>"; echo "<td class='det-B'>Type of show</td><td class='det-B'>"; echo $answer3; echo "</td></tr>"; echo "<table class='table9'>"; echo "<tr>"; echo "<td class='det-A' width='120'>Venue Name</td><td class='det-A'>"; echo $row['venue_name']; echo "</td></tr>"; echo "<tr>"; echo "<td class='det-B'>Address</td><td class='det-B'>"; echo $row['venue_address']; echo "</td></tr>"; echo "<tr>"; echo "<td class='det-A'>City</td><td class='det-A'>"; echo $row['venue_city']; echo "</td></tr>"; echo "<tr>"; echo "<td class='det-B'>State</td><td class='det-B'>"; echo $row['venue_state']; echo "</td></tr>"; echo "<tr>"; echo "<td class='det-A'>Zip Code</td><td class='det-A'>"; echo $row['venue_zip']; echo "</td></tr>"; echo "<tr>"; echo "<td class='det-B'>Start Date</td><td class='det-B'>"; echo strftime("%b %d, %Y", strtotime($row['start_date'])); echo "</td></tr>"; echo "<tr>"; echo "<td class='det-A'>End Date</td><td class='det-A'>"; echo strftime("%b %d, %Y", strtotime($row['end_date'])); echo "</td></tr>"; echo "<tr>"; echo "<td class='det-B'>Start Time</td><td class='det-B'>"; echo $row['start_time']; echo "</td></tr>"; echo "<tr>"; echo "<td class='det-A'>End Time</td><td class='det-A'>"; echo $row['end_time']; echo "</td></tr>"; echo "<tr>"; echo "<td class='det-B'>Contact</td><td class='det-B'>"; echo $row['contact_name']; echo "</td></tr>"; echo "<tr>"; echo "<td class='det-A'>Phone</td><td class='det-A'>"; echo $row['phone']; echo "</td></tr>"; echo "<tr>"; echo "<td class='det-B'>email</td><td class='det-B'>"; echo "<a href='mailto:".$row['email']."'>".$row['email']."</a>\n"; echo "</td></tr>"; echo "<tr>"; echo "<td class='det-A'>website</td><td class='det-A'>"; echo "<a href='".( strpos( '://', $row['website'] ) ? '' : '' ).$row['website']."'>".$row['website']."</a>\n"; echo "</td></tr>"; echo "<tr>"; echo "<td class='det-B'>Number of Crafters</td><td class='det-B'>"; echo $row['num_crafters']; echo "</td></tr>"; echo "<tr>"; echo "<td class='det-A'>Booth Fee</td><td class='det-A'>"; echo $row['booth_fee']; echo "</td></tr>"; echo "<tr>"; echo "<td class='det-B'>Booth Width</td><td class='det-B'>"; echo $row['booth_size_w']; echo "</td></tr>"; echo "<tr>"; echo "<td class='det-A'>Booth Depth</td><td class='det-A'>"; echo $row['booth_size_d']; echo "</td></tr>"; echo "<tr>"; echo "<td class='det-B'>Electricity Available</td><td class='det-B'>"; echo "$answer"; echo "</td></tr>"; echo "<tr>"; echo "<td class='det-A'>Elctricity Cost</td><td class='det-A'>"; echo $row['electricity_cost']; echo "</td></tr>"; echo "<tr>"; echo "<td class='det-B'>Setup Locations</td><td class='det-B'>"; echo $answer2; echo "</td></tr>"; echo "<tr>"; echo "<td class='det-A'>Juried</td><td class='det-A'>"; echo "$answer1"; echo "</td></tr>"; echo "<tr>"; echo "<td class='det-B'>Jury Fee</td><td class='det-B'>"; echo $row['jury_fee']; echo "</td></tr>"; echo "<tr>"; echo "<td class='det-A'>Jury Requirments</td><td class='det-A'>"; echo $row['jury_req']; echo "</td></tr>"; echo "<tr>"; echo "<td class='det-B'>Application Deadline</td><td class='det-B'>"; echo strftime("%b %d, %Y", strtotime($row['application_dead'])); echo "</td></tr>"; echo "<tr>"; echo "<td class='det-A'>Number of Visitors</td><td class='det-A'>"; echo $row['num_visitors']; echo "</td></tr>"; echo "<tr>"; echo "<td class='det-B'>Special Comments</td><td class='det-B'>"; echo $row['comments']; echo "</td></tr>"; echo "</table>"; } } ?>
  9. here is the url .php?id=89 I would really rather have it end with a better description from the database. Is the a script issue or can it be done with .htaccess please help I am trying this but it does not work. Options +FollowSymLinks RewriteEngine on RewriteRule show_detail/id/(.*) show_detail.php?id=$1
  10. My script prints url's with a ? How can I eliminate the ? and return search engine friendly urls?
  11. I have a form and script that is used to collect information from users. There is one field that is url. There is one field that is email. I want to filter out scripts. I also only want to allow url in the url field and email in the email field. Is there an easy way to filter? I have tried several pieces of code to no avail. <?php $root = $_SERVER['DOCUMENT_ROOT']; include('/home/arts/public_html/shows/includes/config.db.php'); if ($link) { foreach ($_POST as $k => $v) { if (($k == "start_date") || ($k == "end_date") || ($k == "application_dead")) { $varray = explode("/",$v); $v = $varray[2] . "-" . $varray[0] . "-" . $varray[1]; } $v = "'" . addslashes($v) . "'"; if($k != "captcha_code") { $keys[] = $k; $vals[] = $v; } } $fields = implode(",", $keys); $values = implode(",", $vals); //$fields = "id," . $fields; //$values = "null," . $values; $sql = "INSERT into craft_shows ($fields) VALUES ($values)"; $result = mysql_query($sql,$link); if (!$result) { die('There was a problem with your submission. Refresh the page to try again'); } else { echo "Thank you for your submission.<br>"; echo "<a href=\"http://www.artsandcraftsnetwork.com/shows/\">Back to shows</a><br>"; echo "<a href=\"http://www.artsandcraftsnetwork.com/shows/shows_submit.php\">Submit another show</a>"; } } ?>
  12. I am not sure where to put a rel=nofollow tag in this line. echo "<a href='".( strpos( '://', $row['website'] ) ? '' : '' ).$row['website']."'>".$row['website']."</a>\n";
  13. Try this... And get a better date snippet. and start <?php on the beginning of the line. <HEAD> <TITLE>Welcome</TITLE> </HEAD> <BODY> <P>Hi, <?php $firstname = 'Ragena'; // PHP finishes here, now back to HTML ?> Your first name is <?php echo $firstname; ?>. </P> </BODY> </HTML>
×
×
  • 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.