Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- echo '<div id="Result">Content goes here</div>';
- echo "<h1>Table: {$table}</h1>";
- echo "<table border='1'><tr>";
- // printing table headers
- for($i=0; $i<$fields_num; $i++)
- {
- $field = mysql_fetch_field($result);
- echo "<td>{$field->name}</td>";
- }
- echo "</tr>n";
- // printing table rows
- while($row = mysql_fetch_row($result))
- {
- echo "<tr>";
- // $row is array... foreach( .. ) puts every element
- // of $row to $cell variable
- foreach($row as $cell)
- echo '<td><a href="#" onclick="GetAuctionData()">' . $cell . '</a></td>';
- echo "</tr>n";
- }
- echo "<table border='1' width='100%'>
- <tr>
- <th>test1</th>
- <th>test2</th>
- <th>test3</th>
- </tr>";
- $sql="select * from auctions where ARTICLE_NO='110294394238';
- $result = mysql_query($sql);
- while ($row = mysql_fetch_array($result))
- {
- echo "<tr>
- <td>".$row['SELLER_ID']."</td>
- <td>".$row['ACCESSSTARTS']."</td>
- <td>".$row['ARTICLE_NAME']."</td>
- </tr>";
- }
- echo "</table>";
- function GetAuctionData()
- {
- xmlHttp=GetXmlHttpObject()
- if(xmlHttp==null)
- {
- alert("Your browser is not supported?")
- }
- var url="get_auction.php?"
- url=url+"cmd=GetAuctionData"
- url=url+"&sid="+Math.random()
- xmlHttp.onreadystatechange = FetchComplete;
- xmlHttp.open("GET",url,true)
- xmlHttp.send(null)
- }
- echo '<td><a href="#" onclick="GetAuctionData('. $article_no . ')">' . $cell . '</a></td>';
- function GetAuctionData(article_no) {
- new Ajax.Updater('div_to_update', 'get_auction.php', {
- method: 'get',
- parameters: {cmd: 'GetAuctionData', sid: Math.random(), article: article_no}
- }
- }
Add Comment
Please, Sign In to add comment