Jump to content

desperate for help... getting line errors


Alienware

Recommended Posts

Ok so im trying to write an auto responder for my website... so if an admin has the auto responder turned on.. the member that sends the message gets a message up saying that we are busy but will respond when we are able to (somethign like that)...

 

I created the message and the alternate options...

 

I am getting line errors when i load the page!

 

cany ANYBODY help!!??? im at my wits end!

 

here is the code-

 

<?php
require("commBan.php.inc");
require("connections/db.php");
require("connections/require.php");



$qry = mysql_query("SELECT * FROM `players` WHERE `playername` = '$player' LIMIT 1")or die(mysql_error());
$arr = mysql_fetch_array($qry);

$from = $_GET['to'];
$rep = $_GET['rep'];

if ($rep){
$que = mysql_query("SELECT * FROM `inbox` WHERE `id` = '$rep' LIMIT 1")or die(mysql_error());
$ary = mysql_fetch_array($que);

$from = $ary['from'];
$tit = $ary['title'];
$on = $ary['date'];
}

$submit = strip_tags($_POST['submit']);
$user = strip_tags($_POST['user']);
$title = addslashes($_POST['title']);
$msg = addslashes(strip_tags($_POST['msg']));

if ($submit){

if (!$user){
$error = "Please specify which player you wist to send a message to.";
error($error);
}elseif ($user){

if (!$title){
$title = "None";
}

if (!$msg){
$error = "Please enter a messagAe to send.";
error($error);
}elseif ($msg){

if (ereg("[^A-Za-z0-9]", $user)){
$error = "Playername can only contain alphanumeric characters.";
error($error);
}elseif (!ereg("[^A-Za-z0-9]", $user)){

$chk = mysql_query("SELECT `id` FROM `players` WHERE `playername` = '$user' LIMIT 1")or die(mysql_error());
$exist = mysql_numrows($chk);

if ($exist == 0){
$error = "That player does not exist.";
error($error);
}elseif ($exist == 1){

mysql_query("INSERT INTO `inbox` ( `id` , `playername` , `from` , `title` , `message` , `read` , `date` , `protected` )
VALUES
( '' , '$user' , '$player' , '$title' , '$msg' , '0' , '$date' , '0' )")or die(mysql_error());

$auto = mysql_query("SELECT * FROM `players` WHERE `Autoreply` = '$aut' LIMIT 1")or die(mysql_error());


if ($aut == 0){
$upd = "Message sent to <a href=\"profile.php?player=".$user."\" target=\"main\">".$user.".";
upd($upd);
)elseif ($aut == 1){
$autorep = "Message sent to <a href=\"profile.php?player=".$user."\" target=\"main\">".$user."."<br><br>Thank you for taking the time to message us!<br>As we recieve such a high amount of messages a day we are not always able to respond to all messages immediately<br>
If your question is of the non urgent type then please feel free to use the Helpdesk or message a HDO for further assistance!
<br>Thank you for understanding.<br>
NYM Staff."

}}}}}
?>

 

Thanks in advance

Link to comment
Share on other sites

It is never good to do a }}}} to close braces. Indentation is the way to go. It just makes it harder to debug.

 

You need to get a syntax highlighting program, if you had one, you would notice the error here:

 

$autorep = "Message sent to <a href=\"profile.php?player=".$user."\" target=\"main\">".$user."."<br><br>Thank you for taking the time to message us!<br>As we recieve such a high amount of messages a day we are not always able to respond to all messages immediately<br>
If your question is of the non urgent type then please feel free to use the Helpdesk or message a HDO for further assistance!
<br>Thank you for understanding.<br>
NYM Staff."

 

Which should be:

$autorep = "Message sent to <a href=\"profile.php?player=".$user."\" target=\"main\">".$user."<br><br>Thank you for taking the time to message us!<br>As we recieve such a high amount of messages a day we are not always able to respond to all messages immediately<br>
If your question is of the non urgent type then please feel free to use the Helpdesk or message a HDO for further assistance!
<br>Thank you for understanding.<br>
NYM Staff.";

Link to comment
Share on other sites

I would recommend Dreamweaver (as it has phenomenal syntax highlighting) but if you are looking for something FREE I would go with notepad++.. IMO yall

 

lol Dreamweaver, worst program ever in my books. But I am also not a web designer, so yea. Notepad++ has my go all the way. For big projects, Eclipse with PHP plugin works wonderfully :)

Link to comment
Share on other sites

I would recommend Dreamweaver (as it has phenomenal syntax highlighting) but if you are looking for something FREE I would go with notepad++.. IMO yall

 

lol Dreamweaver, worst program ever in my books. But I am also not a web designer, so yea. Notepad++ has my go all the way. For big projects, Eclipse with PHP plugin works wonderfully :)

 

Well I don't use the Design part for web design, YOU SHOULD NEVER USE A WYSIWYG for web design! that is a VERY bad practice! LEARN SOME CODE! LOL :P

Link to comment
Share on other sites

1. what error message now?

 

2. please copy-paste the file here.. example above

Parse error: syntax error, unexpected ')' in /home2/nymobste/public_html/send_msgtest.php on line 67

u copy paste "send_msgtest.php"

 

3. try view the original file in the site.. perhaps the size you should have and size in server are different?

 

)elseif ($aut == 1){

 

}elseif ($aut == 1){

???

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.