Hi there,
Am making a website for a friend and have encountered a problem that i need fixing fast.
I get this error when i try to run the code below:
QuotePHP Error Message
Warning: Unexpected character in input: '' (ASCII=92) state=1 in /home/a1408362/public_html/admin.php on line 75
PHP Error Message
Parse error: syntax error, unexpected T_LNUMBER in /home/a1408362/public_html/admin.php on line 75
This is the code (sorry about the length, just didn't want to leave anything out!):
Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html
xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html;
charset=utf-8" /><title>Radio Ilam | Radio of the Suburbs</title><meta name="keywords" content="music
note, free template, website template, CSS, XHTML" /><meta name="description" content="Music Note - free
CSS template provided by templatemo.com" /><link href="templatemo_style.css" rel="stylesheet"
type="text/css" /><style type="text/css">
.style1 {
text-align: center;
}
.style2 {
font-weight: bold;
color: #C32929;
}
.style3 {color: #FF0000}
td {padding: 2px; vertical-align:top; border-top: 1px solid #CCC;}
</style></head>
<body>
<?php
// Connects to your Database
mysql_connect("PURPOSELY LEFT OUT", "PURPOSELY LEFT OUT", "PURPOSELY LEFT OUT") or die(mysql_error());
mysql_select_db("a1408362_data") or die(mysql_error());
//checks cookies to make sure they are logged in
if(isset($_COOKIE['ID_my_site']))
{
}
$username = $_COOKIE['ID_my_site'];
if ($username <> "administrator")
{ header("Location: login.php");
}
else {}
?>
<div id="templatemo_container_wrapper">
<div id="templatemo_container">
<div id="templatemo_header">
<div id="templatemo_site_title">Radio<span class="style2">Ilam</span></div>
<div id="templatemo_site_slogan">Radio of the Suburbs</div>
</div>
<div id="templatemo_menuleft"></div>
<div id="templatemo_menu">
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="competitions.php">Competitions</a></li>
<li><a href="#">Lates Music</a></li>
<li><a href="#" class="current">Members</a></li>
<li><a href="#">Listen Live</a></li>
<li><a href="#">Contact Us</a></li>
</ul>
</div>
<div id="templatemo_content">
<div id="templatemo_left_column">
<div class="templatemo_section2">
<h1>Administrator</h1>
<p>Welcome
<p><a href="logout.php">Logout</a></p>
</div>
<br />
</div>
<div id="templatemo_right_column">
<h1>Administrator</h1>
<p>
<?php
\line 100
$myResult = mysql_query("SELECT * FROM users")
or die ("Unable to select entries in database.");
print '<table>'."n";
while ($row = mysql_fetch_array($myResult, MYSQL_ASSOC)) {
print '<tr>'."n";
print '<td>' .$row['fname'].'</td>'."n";
print '<td>' .$row['lname'].'</td>'."n";
print '<td>' .$row['username'].'</td>'."n";
print '<td>' .$row['email'].'</td>'."n";
$id=$row['id'];
print '<td><a href="';
print ($server['PHP_SELF']);
print '?delete_id=' .$id.'">Delete User</a>
</td>';
}
print '</table>'."n";
if ($_GET['delete_id']) {
$id = $_GET['delete_id'];
$success = mysql_query ("DELETE FROM users WHERE id = $id")
or die ("Unable to delete record from database");
\150
if ($success) {
print "User successfully deleted";
{ header("Location: admin.php");
}
}
}
print '<form action="user_pass.php" method="post">';
print "View password of this user:";
print '<select name="catergory">'."n";
print '<option value="none">Select a User</option>'."n";
$Catergories = mysql_query('SELECT * FROM ref_catergories');
while ($Catergory = mysql_fetch_array($Catergories, MYSQL_ASSOC)){
echo "$RefLinks[cat_id]==$Catergory[id]
n";
print '<option value="'.$Catergory['id'].'">'.$Catergory['catergory_name']."</option>n";
}
print '</select>'."<br />n";
print '<input type="submit" value="Ok">;
print '</form>';
?>
</p>
</div>
</div>
<div id="templatemo_footer">Copyright © 2009 RadioIlam<a href="#"></a></div>
</div>
</div>
</body>
</html>
Time-based image rotation script
I'm trying to write a PHP script that rotates an image based on what time of day it is. I want the script to show day.jpg from 6 AM to 6 PM, and to show night.jpg from 6 PM to 6 AM.I also need the
php require help needed
Ok i tried to use the search funtion but the word require is everywhere.i'm really new to creating websites... I've built them in the past but allways had some sort of template to go off of from a
Do While statement
hi guys,This may sound trivial but im new to php and as part of an assignmenti have to construct the 10 green bottles song using the do while statement. I can do the statement but it is itengrating
unoconv doc convert to pdf code prob
PHP/5.3.1 Hi. I am trying to use this code to convert docs to .pdf utilizing unoconv. However the page just freezes blank, with no php errors reported. All permissions to folders are set 777. Can
Losing 'page' data
I have this code that allows me to update my database. But after updating, I lose the $_GET['page'] value in the browser. I need this value because it is passed when I go to other pages on the
Help Import Animoto and Youtube
CAn someone help me urgently want to allow users on my website to import youtube/revver/dailymotion and very important animoto videos into the site.This feature will come in the upload window.Can this
problem with sql querry in php script
Hello guys, What I want to do is I want to read out a csv file and then but te conent ot the file in a msql datbase . So far it works but the problem I haven that if I want to let te script to the
Set Categories
I am creating a submission form for somebody to come in and submit products. These products are separated by brand. How can I get them to display according to the brand?Here is the form code:Code:
login from external site
Hi my new experience begins, Now what i am trying to do is i make three pages, login.php logout.php index.php . Now if i will not give correct detail i can not see the index.php ,all working perfect
simplexml_load_file and rss problem
Hi,I have a problem parsing an rss feed using simplexml_load_file - this is strange as i have used the same code to parse literally 1000s of different feeds in the past, and even stranger in that if i