Jump to content

Calender


renip9

Recommended Posts

OK i am trying to get my calender to just show 5 events at a time but everytime i try to change this code to only show 5 it kills my script. can someone please help me. as is it works but it shows all my scheduled events.



<?php

$connection = mysql_connect("localhost","******","******")
or die ("connot connect");

$db = mysql_select_db("BIN",$connection)
or die ("couldn't connect");

$USERVAR = ow4allu;

$sql = "SELECT * FROM calendar_events where USERNAME='$USERVAR' ORDER BY event_start";
$result = mysql_query($sql) or die("cannot connect");

while ($newArray = mysql_fetch_array($result)) {
// give a name to the fields
$event_start = $newArray['event_start'];
$event_title = $newArray['event_title'];




echo "<font color=\"#FFFFFF\"><strong>$event_title</strong><br> $event_start </font><br><br>";


}





?>
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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