News:

Wondering if this will always be free?  See why free is better.

Main Menu

Need Help

Started by calthephenom, November 22, 2009, 03:10:34 PM

Previous topic - Next topic

calthephenom

it usually says "Unexpected '>' "

Arantor

PHP should tell you what line it's on and in which file, meaning you should be able to track it down from there.

calthephenom

ill add it, but im removing it right after i show you the error ok?

calthephenom

heres the code that works so far

<?php
if ($context['user']['is_logged'])
          { 
<
form name="input" action="http://calthephenom.northeast-networks.net/insert.php" method="post">
 require(
"../SSI.php"); 
<
h2><center><input type="echo $context["user"]['name']; " name="username" /></h2>
  <
td class="right"
   <
select class="other" name="song" id="q10"  onblur="validate(this,'Required')"  
    <
option“Let There Be Rock” </option
    <
optionGirl’s Not Grey” </option
    <
optionYou Oughta Know” </option
    <
option“Man in the Box” </option
    <
optionRamblin’ Man” </option
    <
option“Almost Easy” </option
    <
optionShooting Star” </option
    <
optionSo Whatcha Want” </option
    <
optionE-Pro” </option
    <
option“Rebel Girl” </option
    <
option“White Wedding PtI” </option
    <
option“One Way or Another” </option
    <
optionTangled Up in Blue” </option
    <
option“Livin’ on a Prayer” </option
    <
option“Hello There” </option
    <
optionUncontrollable Urge” </option
    <
optionFeel the Pain” </option
    <
option“Down with the Sickness” </option
    <
option“Panic Attack” </option
    <
option“Hungry Like the Wolf” </option
    <
option“Pump It Up” </option
    <
optionGo Your Own Way” </option
    <
option“Everlong”</option
    <
optionShackler’s Revenge” </option
    <
option“PDA” </option
    <
optionMountain Song” </option
    <
optionAqualung” </option
    <
optionThe Middle” </option
    <
option“Bad Reputation” </option
    <
option“Anyway You Want It” </option
    <
option“Painkiller” </option
    <
option“Carry On Wayward Son” </option
    <
optionPretend We’re Dead” </option
    <
option“Our Truth” </option
    <
optionOne Step Closer” </option
    <
option“My Own Worst Enemy” </option
    <
option“De-Luxe” 1990’s</option
    <
option“Colony of Birchmen” </option
    <
optionPeace Sells” </option
    <
option“Battery” </option
    <
option“Where’d You Go” </option
    <
option“Float On” </option
    <
option“Ace of Spades” </option
    <
optionNirvana “Drain You” </option
    <
option“Spirit in the Sky” </option
    <
option“Nine in the Afternoon” </option
    <
option“That’s What You Get” </option
    <
optionAlive” </option
    <
option“Lump” </option
    <
option“Testify” </option
    <
optionRound Round” </option
    <
option“Give it Away” </option
    <
optionGive it All” </option
    <
optionRush “The Trees” </option
    <
optionLazy Eye” </option
    <
option“Today” </option
    <
optionI Was Wrong” </option
    <
option“Teenage Riot” </option
    <
option“Spoonman” </option
    <
optionCool for Cats” </option
    <
option“Bodhitsattva” </option
    <
option“Rock’n Me” </option
    <
option“Eye of the Tiger” </option
    <
optionChop Suey” </option
    <
option“Psycho Killer” </option
    <
optionMaster Exploder” </option
    <
option“Souls of Black” </option
    <
option“New Kid in School” </option
    <
optionWe Got the Beat” </option
    <
option“Alabama Getaway” </option
    <
option“American Woman” </option
    <
option“Kids in America” </option
    <
option“Come Out Play (Keep ‘em Separated)” </option
    <
optionAlex Chilton” </option
    <
option“Pinball Wizard” </option
    <
option“Visions” </option
    <
option“Get Clean” </option
    <
option“Night Lies” </option
    <
option“Shoulder to the Plow” </option
    <
option“Welcome To The Neighborhood” </option
    <
option“A Jagged Gorgeous Winter” </option
    <
optionConventional Lover” </option
    <
optionSupreme Girl” </option
    <
optionRob the Prez-O-Dent” </option
   </
select
<
center>Score
<center><input type="text" name="score" />
<
center>"Percent"
<center>"Instrument:"
<center><input type="text" name="instrument" />
<
center>"Percent"
<center><input type="text" name="percent" />
<
center><input type="submit" value="Submit" />
</
form>
    }
    else
    {
echo 
"sign in to add scores! "
    
}
?>


but the username still doesnt show up or insert?

Arantor

So why didn't the code you posted above work?

You've now removed the <?php ?> tags meaning it's trying to treat the HTML as PHP, and failing.

calthephenom

no, i got the above code to work, but it still doesn't insert my username, it only shows a text box for me to enter my username

Arantor

type="input" value="<?php echo $context['user']['name']; ?>" name="username"

calthephenom

sweet, it now works,but wut about the logged part?

Arantor


calthephenom

it actually turns out the above code does not work , the logged part
thats the problem

Arantor

* Arantor quotes his own signature.

What do you expect it to do and what does it do now?

calthephenom

* calthephenom laughs
i want it to not appear if they are not signed in
when i try to make it do that, it gives me a syntax error.

Arantor

So how do you try and do that, then?

The more information you can provide me with up front, the less hard it is to support you.

calthephenom

sorry, im talking about the script i posted for you a few posts ago, on page 3,
it gives me a "expecting '>' " Error Pretty Consistently

Arantor

And what line number of the script does PHP tell you there's an error?

calthephenom

that is so weird, half the time it works, others it doesnt >_>

Arantor

When it doesn't work, WHAT LINE does PHP tell you it has the error on?

calthephenom


Arantor

So... what's on line 362?

calthephenom

im not exactly sure, im using godaddys hosting,and their online ftp code editor is very vague.
i honestly don't care about the ['user']['is_logged'] thing anymore, i just want the Existing Code To Work Outside Of Index.php , whenever I Do So, it usually gives a syntax error

Advertisement: