Alienware Posted August 18, 2008 Share Posted August 18, 2008 Ok so i decided to make a shoutout page on my game site. I uses the Updates script but changd it a bit so that players could post in the same way that mods would post updates. The problem i have is that the Text box that players type in the submit, is below the shouts. I have changed the code so many times but cant figure it out without getting script errors. perhaps someone can help? <?php require("connections/db.php"); require("connections/require.php"); require("connections/replace.php"); $que = mysql_query("SELECT * FROM `shout` ORDER BY `id` DESC")or die(mysql_error()); $qry = mysql_query("SELECT * FROM `players` WHERE `playername` = '$player' ")or die(mysql_error()); $ary = mysql_fetch_array($qry); $staff = $ary['player']; if ($_POST['submit']){ $upd = strip_tags(addslashes($_POST['shout'])); if (!$upd){ $error = "Please input the shout you wish to add."; error($error); }elseif ($upd){ if ($staff == "0"){ $error = "Authorization required."; error($error); }elseif ($player){ mysql_query("INSERT INTO `shout` ( `id` , `updator` , `update` , `date` ) VALUES ( '' , '$player' , '$upd' , '$date' )")or die(mysql_error()); $up = "Update added."; upd($up); }}} ?> <html> <head> <link rel="stylesheet" type="text/css" href="connections/style.css" /> </head> <body> <? while($arr = mysql_fetch_assoc($que)){ $id = $arr['id']; $updator = $arr['updator']; $update = $arr['update']; $date = $arr['date']; $updator = "<a href=\"profile.php?player=".$updator."\">".$updator."</a>"; ?> <table width="75%" class="tbl" align="center"> <tr> <td align="center" class="hdr">.::#<? print $id; ?> <b>On</b> <? print $date; ?> <b>By</b> <? print $updator; ?>::.</td></tr> <tr><td align="left" class="tbl"> <strong>shout:</strong> <? print replace($update); ?></td></tr> </table> <br /> <?} if ($player){?> <form action="" method="post"> <table width="75%" class="tbl" align="center"> <tr> <td align="center" class="hdr">.::Add A Shout::.</td></tr> <tr><td align="center" class="tbl"><textarea name="shout" cols="50" rows="5"></textarea></td></tr> <tr><td align="center" class="tbl"><? sub(submit,"Add shout"); ?></td></tr> </table> </form> <? } ?> </body> </html> (to view the current page to to www.ny-mobster.net and go to shoutout.) Link to comment https://forums.phpfreaks.com/topic/120121-solved-getting-line-errors/ Share on other sites More sharing options...
Alienware Posted August 18, 2008 Author Share Posted August 18, 2008 changed* Text Imput Box* Link to comment https://forums.phpfreaks.com/topic/120121-solved-getting-line-errors/#findComment-618860 Share on other sites More sharing options...
Alienware Posted August 18, 2008 Author Share Posted August 18, 2008 anyone? Link to comment https://forums.phpfreaks.com/topic/120121-solved-getting-line-errors/#findComment-618937 Share on other sites More sharing options...
Alienware Posted August 18, 2008 Author Share Posted August 18, 2008 I sorted it, it doesnt matter Link to comment https://forums.phpfreaks.com/topic/120121-solved-getting-line-errors/#findComment-618951 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.