Posted by funkychicken818@gmail.com on 04/26/06 08:23
From: FunkyChciekn818 - view profile
Date: Tues, Apr 25 2006 6:49 pm
Email: "FunkyChciekn818" <funkychicken...@gmail.com>
show options
Reply | Reply to Author | Forward | Print | View Thread | Show original
| Remove | Report Abuse | Find messages by this author
what wrong with my script?
<?php
require("connect.php");
require("Sajax.php");
function show_mysql() {
// mysql query
$display="SELECT * FROM Movies ORDER BY id";
$mysql_result=mysql_query($display);
while ($row=mysql_fetch_array($mysql_result))
{
$id=$row["id"];
$Name=$row["Name"];
$Link=$row["Link"];
$Description=$row["Description"];
$Image=$row["Image"];
$Type=$row["Type"];
$ang_rate=$row["ang_rate"];
return print"<table align=\"center\">
<tr>
<td><div align=\"center\">
<table width=\"376\" background=\"/images/bg.jpg\" align=\"center\">
<tr>
<td width=\"98\" rowspan=\"0\"><img src=\"$Image\" width=\"65\"
height=\"65\"><br><span class=\"style3\">$Name</span></td>
<td height=\"91\" colspan=\"3\"><span
class=\"style1\">$Description</span></td></tr>
<tr>
<td width=\"130\"><div align=\"left\"><a
href=\"play_movie.php?row_id=$id\"><span class=\"style1\">Play
Game</span></a></div><div align=\"left\"><a
href=\"comment.php?row_id=$id\"><span class=\"style1\">Add
Comment</span></a></div></td>
<td width=\"264\"><form action=\"rating.php\" method=\"GET\">
<input type=\"hidden\" value=\"$id\" name=\"id\">
<select
name=\"rating\">
<option
selected>Rate Movie</option>
<option
value=\"1\">1</option>
<option
value=\"2\">2</option>
<option
value=\"3\">3</option>
<option
value=\"4\">4</option>
<option
value=\"5\">5</option>
<option
value=\"6\">6</option>
<option
value=\"7\">7</option>
<option
value=\"8\">8</option>
<option
value=\"9\">9</option>
<option
value=\"10\">10</option>
</select>
<input type=\"submit\"
value=\"Go\">
</form></td>
<td width=\"0\" height=\"28\"><div align=\"center\"><span
class=\"style1\">Rating: $ang_rate</span></div></td></tr>
</table></div></div></td></tr></table>";
}
}
//starting SAJAX stuff
$sajax_request_type = "POST";
sajax_init();
sajax_export("show_mysql");
sajax_handle_client_request();
?>
<html>
<head>
<title>MySiteSucks Movies</title>
<script>
<?
sajax_show_javascript();
?>
function show_me(date_server) {
document.getElementById("date_div").innerHTML =
date_server;
}
function mysql_display() {
//put the return of php's show_now func
//to the javascript show_me func as a parameter
x_show_mysql(show_me);
}
</script>
</head>
<body onLoad="mysql_display();">
<table id="date_div">Loading....</table>
</body>
</html>
Navigation:
[Reply to this message]
|