Jump to content

atlanta

Members
  • Posts

    172
  • Joined

  • Last visited

    Never

Everything posted by atlanta

  1. <html><body> <h4>test</h4> <form action="process.php" method="post"> Message: <input name="message" type="text" /> <input type="submit" /> </form> </body></html> you had message="message" needed to be name="message" also <?php // Open database connection mysql_connect("localhost", "*********", "**********") or die(mysql_error()); mysql_select_db("*******8") or die(mysql_error()); $name = mysql_real_escape_string($_POST['message']); // Insert data $query = "INSERT INTO friends (name) VALUES ('$name')"; mysql_query($query) or die(mysql_error()); print "updated"; ?>
  2. Yea you will have to do it as a session throughout if you want it to work that way.. I have some apps that will go through php files and change certain strings.. if you dont wanna do it this way then have the cookie expire after a period of time, do a survey and see how long the average user stays on.. just throwing some ideas out there
  3. No problem if it worked hit the topic solved button.. -WILL-I-AM-
  4. yea good idea i knew it was something wrong with that .. thanks for the correction.
  5. <?php $test = "word_word"; $teststr = str_replace("_", " ", $test); echo $teststr; ?>
  6. Sorry didnt look at the code good the first time. $query = "SELECT * FROM listings WHERE category = '{$_GET['id']}'"; $result = mysql_query($query); $numrows = mysql_num_rows($result); $row_count = "0"; for($x = 0; $row = mysql_fetch_array($result); $x++) { $id = $row['id']; $lines = stripslashes($row['lines']); $markets = stripslashes($row['markets']); $opportunity = stripslashes($row['opportunity']); $listings .= '<div id="list"><table width="100%"><tr><td class="listID"><a href="NEED_LINK?id='.$id.'">Listing ID: '.$id.'[/url]</td></tr><tr><td class="listLine">Product Lines: '.$lines.'</td></tr><tr><td class="listLine">Target Markets: '.$markets.'</td></tr><tr><td class="listLine">Sales Opportunity: '.$opportunity.'</td></tr></table></div>'; $row_count++; if (!$numrows == "0") { $listings = '<div>Sorry, no listings under '.$category.' matchining your criteria were found.</div>'; } }
  7. $query = "SELECT * FROM listings WHERE category = '{$_GET['id']}'"; $result = mysql_query($query); $numrows = mysql_num_rows($result); for($x = 0; $row = mysql_fetch_array($result); $x++) { $id = $row['id']; $lines = stripslashes($row['lines']); $markets = stripslashes($row['markets']); $opportunity = stripslashes($row['opportunity']); $listings .= '<div id="list"><table width="100%"><tr><td class="listID"><a href="NEED_LINK?id='.$id.'">Listing ID: '.$id.'</a></td></tr><tr><td class="listLine"><b>Product Lines:</b> '.$lines.'</td></tr><tr><td class="listLine"><b>Target Markets:</b> '.$markets.'</td></tr><tr><td class="listLine"><b>Sales Opportunity:</b> '.$opportunity.'</td></tr></table></div>'; $row_count++; if (!$numrows) { $listings = '<div><b>Sorry, no listings under '.$category.' matchining your criteria were found.</b></div>'; } }
  8. Something like this . if (isset($subscribe)) { $subscribe = "Subscribed"; } else { $subscribe = "Not Subscribed"; } put that after $subscribe = $_POST['subscribe']; only if that is how you have your code written post up your php code so i can tell you for sure,
  9. Yea use php to set your session variable as showed here http://us2.php.net/session look over that link . if you need help let us know`
  10. Post the code up that you have .
  11. The way i do it is escape out of php and echo the html inside of making php work to display the content.. ex. <?php if($variable == "yes") { ?> <b>Bold</b><i>text</i> <? } ?>
  12. very first line elseif(isse($_GET['id'])) needs to be elseif(isset($_GET['id']))
  13. Something simple that will change the background on your page when different level is selected <html> <script language="JavaScript"> <!-- var Color = new Array(); Color[1] = '#FF0000'; Color[2] = '#00FF00'; Color[3] = '#FFFF00'; function changeBG(myColor){ document.bgColor = Color[myColor]; } //--> </script> <select name="d" onChange="javascript:changeBG(this.value)"> <option value="1">High</option> <---- background red <option value="2">Medium</option> <---- background green <option value="3" selected>Low</option> <---- background yellow </select> </body> </html>
  14. Ok so you mean when the user select red the background of the box turns RED??.. If so you will want to use javascript
  15. Try this in your php file <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <!-- TemplateBeginEditable name="doctitle" --> <title>Your Request Has Been Submitted</title> <!-- TemplateEndEditable --> <!-- TemplateBeginEditable name="head" --> <!-- TemplateEndEditable --> </head> <body> <?php $recipient = "email@email.com"; $from = "email@email.com"; $subject = "Newsletter Submission"; $SubmittingDepartment = $_POST['SubmittingDepartment']; $Contributor = $_POST['Contributor']; $NewsletterText = $_POST['NewsletterText']; $EventDescription = $_POST['EventDescription']; $EventDate = $_POST['EventDate']; $LrgCopyDescription = $_POST['LrgCopyDescription']; $LrgCopyDate = $_POST['LrgCopyDate']; $MassEmailDescription = $_POST['MassEmailDescription']; $MassEmailDate = $_POST['MassEmailDate']; $LetterDescription = $_POST['LetterDescription']; $LetterDate = $_POST['LetterDate']; $MaintenanceDescription = $_POST['MaintenanceDescription']; $MaintnenanceDate = $_POST['MaintenanceDate']; $Visitor = $_POST['Visitor']; $VisitingDepartment = $_POST['VisitingDepartment']; $VisitDate = $_POST['VisitDate']; $message = "<html><body><p><b>Submitting Department:</b> ".$SubmittingDepartment."<br /><b>Contributor:</b> ".$Contributor." <br /><b>Newsletter Text:</b> ".$NewsletterText." <br /><b>Upcoming Event:</b> ".$EventDescription." <b>Date:</b> ".$EventDate."<br /><b>Large Copy Job:</b> ".$LrgCopyDescription." <b>Date:</b> ".$LrgCopyDate."<br /><b>Mass E-mail Distribution:</b> ".$MassEmailDescription." <b>Date:</b> ".$MassEmailDate."<br /><b>Letter Distribution:</b> ".$LetterDescription." <b>Date:</b> ".$LetterDate." <br /><b>Scheduled Maintenance:</b> ".$MaintenanceDescription." <b>Date:</b> ".$MaintnenanceDate."<br /><b>Visitor:</b> ".$Visitor." <b>Will be visiting:</b> ".$VisitingDepartment." on: ".$VisitDate."<br /></body></html>"; //In case any of the lines are larger than 70 characters, use wordwrap $message = wordwrap($message, 70); $headers = "From: $from\nContent-Type: text/html; charset=iso-8859-1"; ini_set("SMTP","my.email.server"); # Send the email mail($recipient, $subject, $message, $headers); echo("<p>Your message has been sent. Thank you!</p>\n"); ?> </body> </html>
  16. If you actually have php check the filesize and type then no.. but if you only where the html form tries to validate the size and type then yes
  17. The second error is telling you that you have this section wrong. $db_conn = new COM("ADODB.Connection"); $connstr = "Driver={Microsoft Access Driver (*.mdb)}; DBQ=F:\Wellness Program\Copy of HR Employee Wellness Program.mdb;"; Make sure your syntax for these lines are correct.
  18. I really dont see a problem here only thing i could say it is one of the 2 . 1. Your Server Integrity is bad (possible) or 2. User Error (MORE LIKELY) Have you yourself ever had the 404 problem recently?
  19. The above makes no sense read it again to yourself lol
  20. I say the delimiter is important it will allow you to read the access log better.
  21. md5 http://us2.php.net/md5 or sha1 http://us2.php.net/manual/en/function.sha1.php
  22. the way he wrote the query is just the correct longer way of writing the sql query thats all
  23. Access your control panel and copy and paste your error logs here.
  24. Yea i mean have the c# app from your computer read a log or have the php script send data to your pc which would in return trigger the c# app to play a sound
  25. http://www.phpfreaks.com/tutorials/43/0.php
×
×
  • 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.