View Full Version : _.-*>another Problem!<*-._
jad9321
07-08-2006, 11:03 PM
Ok...... This isnt working... whith this script:
<? @chmod("requests.php", 0777);
if(!is_writable("requests.php")){
@chmod("requestline.php", 0777);
if(!is_writable("requestline.php")){
Echo"<b>Error:</b> You havent Chmodded the requestline.php And/Or the requests.php file, You need to go back and Chmod the dbinfo.php file.
After you do that press the button below.
<form method='post' action='install2.php'>
<input type='submit' value='I have CHMODDED requests.php AND requestline.php'>
</form>";
Echo"dbinfo.php <br />
If you see an error above PAY ATTENTION TO IT! IF YOU DON'T Your script WILL NOT WORK!!!<br />
<form method='post' action='install3.php'>
<input type='submit' value='There is no error above and I am ready to move on!'>
</form>"; ?>
I get this error:
Parse error: parse error, unexpected $ in /fpgs/fpgshttpd/smileyoureahabbo/scripts/radiobox/install2.php on line 22
I DO NOT SEE A $ ANYWARE IN THAT SCRIPT!
It's a rather unhelpful error, I must admit. Newer versions of PHP are more descriptive.
What it's trying to tell you is that the page has ended while there's still a code block open.
jad9321
07-08-2006, 11:13 PM
Can it be fixed?
Yes, you just have to close the offending code block(s).
jad9321
07-08-2006, 11:44 PM
And how do you do that? lol... I really am not smart when it comes to this stuff.
jad9321
07-08-2006, 11:53 PM
Lol.
And where does that go?
I don't know, wherever you intended to close those if blocks :)
jad9321
07-09-2006, 12:13 AM
They are closed.... And it didnt work... They have always ben closed....
<? @chmod("requests.php", 0777);
if(!is_writable("requests.php")){
@chmod("requestline.php", 0777);
if(!is_writable("requestline.php")){
jad9321
07-09-2006, 12:15 AM
Ohh nvm... I'm sooo dumb.
jr_yeo
07-09-2006, 12:36 AM
<? @chmod("requests.php", 0777);
if(!is_writable("requests.php")){
@chmod("requestline.php", 0777);
if(!is_writable("requestline.php")){
// somewhere else on the script
}
}
please don't take this the wrong way but, do u have any background/training at all with any programming language available in the market like ( i dunno) Turbo Pascal, Turbo C, C++, Java, JavaScript, VB.NET, C#, J# to name a few :p
i just would like to assess what are ur strengths and weaknesses in regards to understanding code snippets and programming jargons. :D
jad9321
07-09-2006, 12:52 AM
Nope only Html and Php...
Can you guys look at this:
<?
$dbhost = "DBHOST";
$dbuser = "DBUSER";
$dbpwd = "DBPASSWORD";
$dbname = "DBNAME";
mysql_connect($dbhost, $dbuser, $dbpwd);
mysql_select_db($dbname);
?>
<html>
<head>
<title>Request Line</title>
</head>
<body>
<?php
if (!isset($_POST['submit'])) {
?>
<form action="" method="post">
Habbo Name: <input type="text" name="Habbo Name"><br>
Song Request: <input type="text" name="Snog Request"><br>
Shoutout/Joke: <input type="text" name="Shoutout/Joke"><br>
<input type="submit" name="submit" value="Request">
</form>
<?php
$Habbo Name = $_POST['Habbo Name'];
$Song Request = $_POST['Song Request'];
$Shoutout/Joke = $_POST['Shoutout/Joke'];
mysql_query("INSERT INTO `request` (Habbo Name, Song Request, Shoutout/Joke) VALUES ('$Habbo Name', '$Habbo Name', '$Shoutout/Joke')");{
echo "Your Request has ben sent!
?>
</body>
</html></body>
</html>
I seem to be getting this error:
Parse error: parse error, unexpected T_STRING in /fpgs/fpgshttpd/smileyoureahabbo/scripts/radiobox/requestline.php on line 24
jr_yeo
07-09-2006, 01:16 AM
Nope only Html and Php...
tnx for that info.
if(condition)
sun is up;
else
raining;
in this case, there is no need for open and close curly brace { }
but
if (condition) {
sun is up;
joe will play outside;
} else {
raining;
joe will play inside;
}
in this case, there should be a corresponding closing curly brace for every open curly brace that exists in the script.
NOW, to the heart of the matter :D
Like Twey said
It's a rather unhelpful error, I must admit. Newer versions of PHP are more descriptive.
What it's trying to tell you is that the page has ended while there's still a code block open.
The latest problem:
mysql_query("INSERT INTO `request` (Habbo Name, Song Request, Shoutout/Joke) VALUES ('$Habbo Name', '$Habbo Name', '$Shoutout/Joke')");{
echo "Your Request has ben sent!";The red brace shouldn't be there but is, and the blue quote and semicolon should be there but aren't :)
</body>
</html></body>
</html>Conversant with HTML, eh? :p
jad9321
07-09-2006, 02:31 AM
Still gets error... (on latest problem)
Oh, and the variable names are totally ridiculous.
A variable name may contain only alphanumeric characters and underscores, can't start with a number, and must always be prefixed with a dollar sign ($).
BLiZZaRD
07-09-2006, 11:42 AM
Unless the variable name is in a string...
<?php
$array['456'];
$array['-'];
>?
<?php ${'456'} = "my number variable"; ?>
Would then work just the same...
Complex I know.. but at least I am learning some of this stuff :p
jad9321
07-09-2006, 03:44 PM
Ok... That didn't even fix it...
Heres the script now:
<?
$dbhost = "DBHOST";
$dbuser = "DBUSER";
$dbpwd = "DBPASSWORD";
$dbname = "DBNAME";
mysql_connect($dbhost, $dbuser, $dbpwd);
mysql_select_db($dbname);
?>
<html>
<head>
<title>Request Line</title>
</head>
<body>
<?php
if (!isset($_POST['submit']));{
?>
<form action="" method="post">
Habbo Name: <input type="text" name="Habbo Name"><br>
Song Request: <input type="text" name="Snog Request"><br>
Shoutout/Joke: <input type="text" name="Shoutout/Joke"><br>
<input type="submit" name="submit" value="Request">
</form>
<?php
$HabboName = $_POST['Habbo Name'];
$SongRequest = $_POST['Song Request'];
$ShoutoutJoke = $_POST['Shoutout/Joke'];
mysql_query("INSERT INTO `request` (Habbo Name, Song Request, Shoutout/Joke) VALUES ('$HabboName', '$SongRequest', '$ShoutoutJoke')");{
echo "Your Request has ben sent!";
?>
</body>
</html></body>
I get error:
Parse error: parse error, unexpected $ in /fpgs/fpgshttpd/smileyoureahabbo/scripts/radiobox/requestline.php on line 32
You still haven't removed that opening brace I told you to.
jad9321
07-09-2006, 03:55 PM
Which One?
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.