Jump to content

MYSQL problems


Go to solution Solved by Ch0cu3r,

Recommended Posts

Hello Im just new to coding into php and im getting this error? i cant seems to see database into my php ? what wrong need help

 

CREATE TABLE IF NOT EXISTS `payment_details` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `idnumber` varchar(30) NOT NULL,
  `date` varchar(30) NOT NULL,
  `amount` varchar(30) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

Here my php code i cant seems to understand what wrong i dont get any error from mysql or from my php  please i dont know what wrong 

 

<label for="filter">Filter</label> <input type="text" name="filter" value="" id="filter" />
								<table cellpadding="1" cellspacing="1" id="resultTable">
									<thead>
										<tr>
											<th  style="border-left: 1px solid #C1DAD7"> Date </th>
											<th>Amount</th>
										</tr>
									</thead>
									<tbody>
								<?php
										include('../connect.php');
									$id=$_SESSION['SESS_MEMBER_ID'];	
										$result = mysql_query("SELECT * FROM student WHERE id='$id'");
										while($row = mysql_fetch_array($result))
											{
												echo '<tr class="record">';
												echo '<td style="border-left: 1px solid #C1DAD7"><div align="left">'.$row['date'].'</div></td>';
												echo '<td><div align="left">'.$row['amount'].'</div></td>';
												echo '</tr>';
											}
										?> 
									</tbody>
								</table>
Link to comment
https://forums.phpfreaks.com/topic/290331-mysql-problems/
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • 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.