Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by Beeeeney

  1. If it is dropdowns: Day, month & year, then catch it in an array and implode it: $day = $_POST['day']; $month = $_POST['month']; $year = $_POST['year']; $date = array($day, $month, $year); $date = implode('-', $date); Then you can just use the $date variable in your MySQL query to insert it into the database. This is the best way I know how. Maybe someone else knows a better solution?
  2. Sure, if you take some time and allocate it to reading the last 3 very short posts in this thread, you'll see.
  3. Use something like: SELECT * FROM 'tablename' ORDER BY 'dateadded' DESC LIMIT 3; Also, your query won't be executed there. You need to use your variable "$sql" as the mysql query. $sql = "Your Query"; $result = mysql_query($sql); Then use your "$result" variable to echo the data.
  4. But the internet said it would.. Someone else suggested this: Options -MultiViews RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ $1.php [L]
  5. I found this on Stackoverflow, apparently it works. RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.php -f RewriteRule ^(.*)$ $1.php
  6. Sure mate! Here you go http://forums.phpfreaks.com/forum/20-php-freelancing/
  7. Have you even attempted to do this on your own?
  8. But $organiserid IS 0. You told your code that it is 0. I hope you find the help you need!
  9. Stab in the dark, but try this: <?php $query = "SELECT * FROM eventjobs WHERE organiserid = " . intval($_SESSION['userID']) . " LIMIT 10"; $result = mysql_query($query); $row = mysql_fetch_array($result); if (empty($result)) { echo 'You have no events. Create an event.'; } else { ?> <div class="eventjoblistings"> <div class="boardeventfield"> <div class="boardeventfieldintro"> <div class="boardeventdatatitle"> <?php echo (!empty($row['eventname'])) ? $row['eventname'] : ''; ?> </div> <div class="boardeventdata"> <?php echo (!empty($row['eventdetails'])) ? $row['eventdetails'] : ''; ?> </div> <div class="boardeventdatahalf"> <?php echo (!empty($row['eventlocation'])) ? $row['eventlocation'] : ''; ?>, </div> <div class="boardeventdatahalf"> <?php echo (!empty($row['eventcountry'])) ? $row['eventcountry'] : ''; ?> </div> </div> <div class="boardeventfielddetails"> <div class="boardeventdatasupplier"> <?php echo (!empty($row['supplier1'])) ? $row['supplier1'] : ''; ?> </div> <div class="boardeventdata"> <?php echo (!empty($row['supplierdetails1'])) ? $row['supplierdetails1'] : ''; ?> </div> <div class="boardeventdata"> <?php echo (!empty($row['budget1'])) ? $row['budget1'] : ''; ?> </div> </div> <div class="boardeventfielddetails"> <div class="boardeventdata"> <?php echo (!empty($row['supplier2'])) ? $row['supplier1'] : ''; ?> </div> <?php echo (!empty($row['details2'])) ? $row['details2'] : ''; ?> <div class="boardeventdata"> <?php echo (!empty($row['budget2'])) ? $row['budget2'] : ''; ?> </div> </div> </div> </div> <?php } ?>
  10. if ($result = mysql_query($query)) { Will always return false, seeing as you haven't assigned anything to $result.
  11. You've told your code to echo something if a variable is empty, on a variable you haven't declared. Then you're asking why it's echoing.
  12. Don't really see what you're trying to do but if you want to use one of the strings in that array for something then just use [0], [1], [2], etc.
  13. It's a table in your database. I don't know where you should be putting that.
  14. Well according to that error, you've passed a boolean into your mysql_fetch_array() function. More specifically, $result. Show me the code where you declared $result.
  15. // This file is www.developphp.com curriculum material // Written by Adam Khoury January 01, 2011 // http://www.youtube.com/view_play_list?p=442E340A42191003 Did you follow a tutorial? Or copy and paste all of it?
  16. A lot of people seem to think that it does.
  17. I think you're referring to w3schools. That's not really a fantastic resource mate.
  18. Sorry, I'm still having trouble understanding. Maybe someone else can help.
  19. Could you clarify what exactly you need?
  20. <?php if (isset($_POST['Submit'])) { // This will check to see if the form has been submitted $senders_email = $_POST['your_email']; // The person who is submitting the form $recipient_friend = $_POST['friend_email']; // The forms recipient mail($recipient_friend,"A message from $senders_email", "Dear $recipient_friend,\n\nYour friend $senders_email, found our site very useful, and thought you would be interested.\n\nPlease follow the link to view our site:\nhttp://www.your_sites_address.com\n\nThank You\n\nThe your_sites_address.com", 'From: "your_site" <your_email.com>'); if (isset($_POST['your_email'])) { echo "<br>Your friend $recipient_friend has been contacted <br><br>Thank you $senders_email"; }} ?> <form action="" method="POST"> <fieldset> <legend>Tell a friend</legend><br /> Your email<br /> <input type="text" name="your_email" value="Your email" /><br /><br /> Your Friends email<br /> <input type="text" name="friend_email" value="Your friends email" /> <input type="Submit" value="Tell a friend" name="Submit" /> </fieldset> </form> Just had to post this for clarity.
  21. You do have it installed on a local server, right?
  22. There are access to forms that have already been written, but not on this website. Google it, or go learn some PHP. Not too hard to learn the basics. There are online tutorials everywhere. Some good stuff even on YouTube.
  23. You have method="post" and on the next page, you're trying to get it with $_GET.
  • 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.