Jump to content

billynastie

Members
  • Posts

    20
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

billynastie's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi All, Just a quick query I need to either write from scratch or for someone to tell me if what im doing is possible basically I need a shopping cart but it has to have a few differences it needs to firstly it needs to be able to take deposits then pay the rest on account like terms pay monthly pay weekly etc etc and it also needs to generate regular invoices like everytime someone makes a payment off their account and generate pdf invoices but create links to that invoice on the customers account menu it also needs to keep accurate account balances of what has been paid off the account and what is remaining. Is there a shopping cart which has accounting features combined in a backend or do i need to read shed loads of scripts and work out how to bind them together. Cheers in advance.
  2. Again thanks for the useful tip but not ticket are not available I want it to generate a random ticket number upon entering the data into the database.
  3. Hi I dont think ive explained what I am trying to do correctly or in full im writing a site when people can purchase a unique ticket number when the user is not logged into the site it still shows the item but underneath it shows a link to a login page and register page but when a user is logged in it shows a buy now button that bit is simple the next stage is where im having the problems the site is only accepting 40 entries per item and when the buy now button is pressed it assigns a unique number into a database and reduces the persons limit for bids by one once 40 entries have been accepted it closes sales and displays the winner and the wohle script has to run say every two seconds to make sure that it hasnt hit the 40 entries already also all items are in one database table and all entries for all items are in another table plus user accounts. Is this something I need a professional coder for or can someone please help me.
  4. Hi im slightly understanding the code especially the bit about joining the tables what ive having problems with is this is where im upto so far and I think im doing it worng because im using both methods. <? mysql_connect('localhost', 'root', '') or die(mysql_error()); mysql_select_db('raffle') or die(mysql_error()); $query = 'SELECT count(*) itemID FROM raffles'; $result = mysql_query($query); $calc ='SELECT SQL_CALC_FOUND_ROWS, itemID FROM items JOIN raffles ON items.ID = raffles.itemID'; $number = mysql_query($calc); list($itemID) = mysql_fetch_array($result, MYSQL_NUM); if (4 < $itemID) { echo "limit reached"; } ?>
  5. Hi thanks for you reply but I want one table to store the ticket numbers for each item not a table for each item for example say im running 2 items one ID1 one ID2 when it does the insert I need it to be able to insert into one table the data from either one of the item so limiting my table to only accept 40 entries is not an option but it does need to be able to insert 40 for ID1 and 40 for ID2 then no more basically it needs to read the database first and regular like every two seconds before allowing another entry and it needs to check how many entries have been inserted against each ID and if it returns 40 it shows IE: purchasing closed and the winner is.
  6. Hi, I am trying to write a piece of code which may seem simple to a few people but im struggling to work it out correctly im after advice first so I wont be posting any of my code until ive been pointed in a direction first just incase im just overlooking something. Basically im using a cms system with login function im pulling data from a table and outputting it and cycling through each line called items what I am trying to do is have a button or link underneath based on whether or not the user is logged in which i can do but next what I need to work out is im only allowing 40 clicks of the button and every time the button is clicked it inserts data into another table but I need this button to change when the database has had 40 entries placed into it and I also have multiple items each with a seperate unique id and it must also only change the button for the item which has had 40 clicks made on it all other items which havent had 40 clicks must still display the button. Im not very good with code and write very scrappy code at first then clean it up when I have it working but as the code isnt working I dont want to post code that doesnt work in the first place or anyone who reads it will try to make it work and it doesnt as it is seriously flawed in a way but if you need to see the code to get an understanding of how im trying to get it to work then please say so. I think I need to break it down and maybe work it out with a few functions but functions are not a strong point of mine and i do need to work the code out as when its fully working the code when the user clicks the button it will go to paypal and back again and upon coming back to the site it will insert a random code into the table after the 40 entries have been reached it will pick a winning ticket number and display it. People are viewing but not replying so I can only presume it is because I have not put in any code so here goes 2 lots of code both of which to do the same thing first one is the one I tried on the CMS program the second is one that is wrote independent of the CMS program. CODE 1 <? mysql_connect(DB_HOST, DB_USERNAME, DB_PASSWORD) or die(mysql_error()); mysql_select_db(DB_NAME) or die(mysql_error()); $query = "SELECT * FROM items"; $result = mysql_query($query) or die(mysql_error()); while($row = mysql_fetch_array($result)){ $item = $row['ID']; $image = $row['image']; $desc = $row['desc']; echo "<table width='450' border='0' cellspacing='0' cellpadding='0'> <tr> <td><img src=\"http://adietech.dyndns.org/raffle/media/".$image."\" width=\"150\" height=\"150\" /></td> <td>".$desc."</td> </tr> <tr> <td></td> <td></td> </tr> </table>"; echo "<br />"; if(FRONTEND_LOGIN AND !$wb->is_authenticated()) { echo"Your Need To Be Logged In And A Member To Buy A Raffle Ticket Click <a href='http://adietech.dyndns.org/raffle/pages/login.php'>Here</a>"; } elseif(FRONTEND_LOGIN AND $wb->is_authenticated()) { $query = "SELECT *, COUNT(itemID) FROM raffles GROUP BY itemID"; $result = mysql_query($query) or die(mysql_error()); // Print out result while($row = mysql_fetch_array($result)){ $total = $row['COUNT(itemID)']; if ($total <= '4') { echo"<form action=\"http://adietech.dyndns.org/raffle/index.php\" method=\"post\"><input type=\"hidden\" name=\"submit\" value=\"true\"><input type=\"hidden\" name=\"id\" value=\"".$item."\"><input type=\"hidden\" name=\"user\" value=\"".$wb->get_display_name()."\">"; for ($i = 0, $z = strlen($a = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890')-1, $s = $a{rand(0,$z)}, $i = 1; $i != 32; $x = rand(0,$z), $s .= $a{$x}, $s = ($s{$i} == $s{$i-1} ? substr($s,0,-1) : $s), $i=strlen($s)); echo "<input type=\"hidden\" name=\"ticket\" value=\"".$s."\"> <input name=\"buy\" type=\"submit\" value=\"Buy A Ticket\" /></form>"; } else { $query = "SELECT *, COUNT(itemID) FROM raffles GROUP BY itemID"; $result = mysql_query($query) or die(mysql_error()); // Print out result while($row = mysql_fetch_array($result)){ $total = $row['COUNT(itemID)']; if ($total > '4') { $itemid = $row['itemID']; $query = "SELECT * FROM raffles WHERE itemID = $itemid LIMIT 1"; $reply = mysql_query($query); $rows = mysql_fetch_array($reply); echo $rows['number']; echo "Raffle Closed"; } } }} if ($_POST['submit']=='true') { $id = $_POST['id']; $user = $_POST['user']; $ticket = $_POST['ticket']; $sql ="INSERT INTO raffles (ID, username, number, itemID) VALUES('', '$user', '$ticket', '$id')"; mysql_query($sql) or die(mysql_error()); } ?> CODE 2 <? mysql_connect('localhost', 'root', '') or die(mysql_error()); mysql_select_db('raffle') or die(mysql_error()); $query = "SELECT * FROM items"; $result = mysql_query($query) or die(mysql_error()); while($row = mysql_fetch_array($result)){ $item = $row['ID']; echo $item; echo "<br />"; } $query = "SELECT *, COUNT(itemID) FROM raffles GROUP BY itemID"; $result = mysql_query($query) or die(mysql_error()); // Print out result while($row = mysql_fetch_array($result)){ $total = $row['COUNT(itemID)']; if ($total <= '4') { echo"FORM"; } else { $query = "SELECT *, COUNT(itemID) FROM raffles GROUP BY itemID"; $result = mysql_query($query) or die(mysql_error()); // Print out result while($row = mysql_fetch_array($result)){ $total = $row['COUNT(itemID)']; if ($total > '4') { $itemid = $row['itemID']; $test = "SELECT * FROM items WHERE ID = $itemid"; $answer = mysql_query($test); $res = mysql_fetch_array($answer); $winner = $res['winner']; if ($winner != '') { echo "Raffle Closed And The Winner Is ".$winner; } else { $query = "SELECT * FROM raffles WHERE itemID = $itemid ORDER BY RAND() LIMIT 1"; $reply = mysql_query($query); $rows = mysql_fetch_array($reply); $user = $rows['username']; $insert ="UPDATE items SET winner = '$user'"; mysql_query($insert); $number = $rows['number']; echo $user." - ".$number; } } } } } ?>
  7. Full working code as i did a bit of reading and found a minor solution to make it work would love to hear from anybody who could take what ive writter and either clean it up or write it as a function. <? echo "<br /> <br />"; $w = mktime(0, 0, 0, date("m"), date("d")+14, date("y")); $four = date("Y-m-d", $w); $wk = mktime(0, 0, 0, date("m"), date("d"), date("y")); $today = date("Y-m-d", $wk); mysql_connect('localhost', 'root', '') or die(mysql_error()); mysql_select_db('season_2008to2009') or die(mysql_error()); $color="1"; $results = "SELECT *, DATE_FORMAT(match_date, '%e %M, %Y') as date, DATE_FORMAT(match_date, '%l:%i %p') as time FROM fixtures ORDER BY match_date ASC"; $queryit = mysql_query($results) or die(mysql_error()); # echo '<table width="500" border="1" align="center" cellpadding="2" cellspacing="0"> <caption>Forthcoming Fixtures</caption> <tr> <th>Opponent</th> <th>Home Team</th> <th>Match Location</th> <th>Match Date</th> <th>Match Time</th> </tr> '; while ($dater = mysql_fetch_array($queryit)){ $check = $dater['match_date']; $checkit = date("Y-m-d", strtotime($check)); # if($color==1){ # echo "<tr bgcolor='#FFC600'>"; if ($checkit <= $four and $checkit >= $today) { $loc = $dater['location']; if ($loc == '1') { $location = 'Home'; } else { $location = 'Away'; } echo "<td>".$dater['opponent']. "</td><td>".$dater['team']."</td><td>".$location."</td><td>". $dater['date'] . "</td><td>". $dater['time'] ."</td></tr>"; } # $color="2"; } # else{ # echo "<tr bgcolor='#CCC600'>"; if ($checkit <= $four and $checkit >= $today) { $loc = $dater['location']; if ($loc == '1') { $location = 'Home'; } else { $location = 'Away'; } echo "<td>".$dater['opponent']. "</td><td>".$dater['team']."</td><td>".$location."</td><td>". $dater['date'] . "</td><td>". $dater['time'] ."</td></tr>"; } # $color="1"; } } echo '</table>'; ?> Hope someone reads this and finds it useful to work out a date problem of their own.
  8. Any Help would be helpful I know someone know an easy solution to this.
  9. Also thanks for your reply ive tried using INTERVAL within the mysql query but the query has to be broke into two date and time for outputting but im also using strtotime but im only a novice and don't really know properly what im doing hence im doing it a way in which i understand i also understand functions but dont know how to write one properly but im presuming it can by done via a number of methods quite easily.
  10. Sort of worked it but it still needs working ive added my complete database structure and entries and also the code ive written -- -- Table structure for table `fixtures` -- CREATE TABLE IF NOT EXISTS `fixtures` ( `id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT, `team` varchar(50) NOT NULL DEFAULT '0', `opponent` varchar(50) NOT NULL, `location` tinyint(10) NOT NULL DEFAULT '0', `match_date` datetime DEFAULT '0000-00-00 00:00:00', `description` varchar(255) NOT NULL, `postcode` varchar(10) NOT NULL, `map` varchar(50) NOT NULL, `now` date NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=9 ; -- -- Dumping data for table `fixtures` -- INSERT INTO `fixtures` (`id`, `team`, `opponent`, `location`, `match_date`, `description`, `postcode`, `map`, `now`) VALUES (5, 'Holding Group', 'Beechfield', 1, '2009-08-09 22:33:24', 'sdma dsa<br>', ' ', '', '2009-08-07'), (6, 'Holding Group', 'Moorside', 1, '2009-08-15 10:41:47', '<br>', ' ', '', '0000-00-00'), (7, '0', '', 0, '0000-00-00 00:00:00', '', '', '', '0000-00-00'), (8, 'Holding Group', 'Moorside Blue', 1, '2009-08-23 10:42:18', '<br>', ' ', '', '0000-00-00'); PHP code <? echo "<br /> <br />"; $w = mktime(0, 0, 0, date("m"), date("d")+14, date("y")); $four = date("Y-m-d", $w); $wk = mktime(0, 0, 0, date("m"), date("d"), date("y")); $today = date("Y-m-d", $wk); mysql_connect('localhost', 'root', '') or die(mysql_error()); mysql_select_db('season_2008to2009') or die(mysql_error()); echo "<br />"; $results = "SELECT *, DATE_FORMAT(match_date, '%e %M, %Y') as date, DATE_FORMAT(match_date, '%l:%i%p') as time FROM fixtures"; $queryit = mysql_query($results) or die(mysql_error()); while ($dater = mysql_fetch_array($queryit)){ $check = $dater['match_date']; $checkit = date("Y-m-d", strtotime($check)); if ($checkit < $today){ echo "No forthcoming fixtures"; } elseif ($checkit > $four) { echo "No Forthcoming Fixtures"; } elseif ($checkit <= $four) { echo $dater['opponent']. " - ". $dater['date'] . " - ". $dater['time'] ."<br />"; } else { echo "Something is wrong"; } } ?> what it is doing now is working but because it is cycling through a while loop it is outputting this. Beechfield - 9 August, 2009 - 10:33PM Moorside - 15 August, 2009 - 10:41AM No forthcoming fixturesNo Forthcoming Fixtures As you can see it shouldn't be displaying the bottom two lines the no forthcoming fixtures i only want it to display the fixture which are fourteen days in advance and no more nothing before todays date and nothing after fourteen days but i also want it to display No Forthcoming Fixtures if there are no forthcoming fixtures that is the only bit im now having problems with. Hope you can help.
  11. Would a IF / IFELSE statement inside a WHILE loop work.a
  12. Hi back once again. Problem is I have a field in my mysql database which is a datetime field I am inserting data into the table and viewing it via Datagrid what i am trying to do is to show all forthcoming events upto 2 weeks away but not past events nor any further than 2 weeks away basically it is a football club website and they want to show forthcoming fixtures I am generally having problems error checking the datetime field for comparison and then displaying the relevant data I cannot personally write functions but can understand them and generally im just stuck in a rut with it I am going to give the database structure and also the code I have written even though I know it is a mess if someone could point me in a direction I could possible work from I would be most grateful. Mysql Database table. CREATE TABLE IF NOT EXISTS `fixtures` ( `id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT, `team` varchar(50) NOT NULL DEFAULT '0', `opponent` varchar(50) NOT NULL, `location` tinyint(10) NOT NULL DEFAULT '0', `match_date` datetime DEFAULT '0000-00-00 00:00:00', `description` varchar(255) NOT NULL, `postcode` varchar(10) NOT NULL, `map` varchar(50) NOT NULL, `now` date NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ; Php code which ive written. <? echo "<br /> <br />"; $w = mktime(0, 0, 0, date("m"), date("d")+15, date("y")); $now = date("Y-m-d", $w); $wk = mktime(0, 0, 0, date("m"), date("d"), date("y")); $today = date("Y-m-d", $wk); mysql_connect('localhost', 'root', '') or die(mysql_error()); mysql_select_db('season_2008to2009') or die(mysql_error()); //$update = "UPDATE fixtures SET now = NOW()"; //mysql_query($update); $date = "SELECT *, DATE_FORMAT(match_date, '%Y') as year, DATE_FORMAT(match_date, '%m') as month, DATE_FORMAT(match_date, '%d') as day, DATE_ADD(match_date, INTERVAL 15 DAY) as date FROM fixtures"; $res = mysql_query($date) or die(mysql_error()); $rowdate = mysql_fetch_array($res) or die(mysql_error()); $day = $rowdate['year']."-".$rowdate['month']."-".$rowdate['day']; $date = $rowdate['date']; if ( $date <= $now ) { $query = "SELECT *, DATE_FORMAT(match_date, '%e %M, %Y') as date, DATE_FORMAT(match_date, '%l:%i%p') as time FROM fixtures WHERE now <= '$today'"; $result = mysql_query($query) or die(mysql_error()); $row = mysql_fetch_array($result) or die(mysql_error()); echo $row['opponent']. " - ". $row['date'] . " - ". $row['time'] ."<br />"; } else { echo "The if statement evaluated to false"; } ?> Cheers for reading.
  13. Take it no one can help me do this.
  14. Hi All I am trying to write a little bit of code for a football team website basically it has a results grid like below. <tbody> <tr> <td width="145"> </td> <td width="32">Barr</td> <td width="32">Beec</td> <td width="32">Beec</td> <td width="32">Boot</td> <td width="32">Dean</td> <td width="32">Dean</td> <td width="32">Flix</td> <td width="32">Mont</td> <td width="32">Moor</td> <td width="32">Moor</td> <td width="32">Park</td> <td width="32">Pend</td> <td width="32">Swin</td> <td width="32">Urms</td> </tr> <tr> <td>Barr Hill</td> <td>X</td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> </tr> <tr> <td>Beechfield Storm</td> <td valign="center" align="center"> </td> <td>X</td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> </tr> <tr> <td>Beechfield Tornado</td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td>X</td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> </tr> <tr> <td>Boothstown Tigers</td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td>X</td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> </tr> <tr> <td>Deans Sports</td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td>X</td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> </tr> <tr> <td>Deans Tigers</td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td>X</td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> </tr> <tr> <td>Flixton Juniors</td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td>X</td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> </tr> <tr> <td>Monton Amatuers</td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td>X</td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> </tr> <tr> <td>Moorside Rangers Blue</td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td>X</td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> </tr> <tr> <td>Moorside Rangers Red</td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td>X</td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> </tr> <tr> <td>Parkwyddn</td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td>X</td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> </tr> <tr> <td>Pendlebury United</td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td>X</td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> </tr> <tr> <td>Swinton Juniors</td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td>X</td> <td valign="center" align="center"> </td> </tr> <tr> <td>Urmston Town</td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td valign="center" align="center"> </td> <td>X</td> </tr> </tbody> What i am having problems with is firstly the names which are both down the left of the grid and shortnames across the top and also getting the mysql data to position in the grid in the correct places mysql data below. CREATE TABLE IF NOT EXISTS `games` ( `ID` int(10) NOT NULL auto_increment, `team` varchar(255) NOT NULL, `opponent` varchar(255) NOT NULL, `date` varchar(25) NOT NULL, `h_or_a` varchar(1) NOT NULL, `score` varchar(25) NOT NULL, PRIMARY KEY (`ID`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ; As you can see im only using simple data within my database and I would like to know if this a wrong method and how to solve this problem. I am really struggling with theis and any help people can send my way as a starting point would be extreamly greatful as I have tried everyway I can think to do this and im hitting a brick wall now. Please Help.
  15. Cheers AlexWD that code you sent did work it was me I had included the code in a seperate file then added it to the main page as well sorry it works fine now thanks again for your help.
×
×
  • 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.