Jump to content

Beeeeney

Members
  • Posts

    193
  • Joined

  • Last visited

About Beeeeney

  • Birthday 02/13/1992

Profile Information

  • Gender
    Not Telling
  • Location
    England!
  • Age
    20

Beeeeney's Achievements

Member

Member (2/5)

8

Reputation

  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.
×
×
  • 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.