Any wrong with this code?

This is a part from the script, but the opition didn’t work :-((

Here:

<TD style="PADDING-RIGHT: 25px" vAlign=top> <FORM action=train.php method=post> <TABLE class=table_lines cellSpacing=0 cellPadding=2 width="100%" border=0> <TBODY> <TR> <TH align=middle colSpan=2>Upgrade Sentry Skill:</TH></TR> <TR> <TH class=subh align=left>Current Sentry Skill:</TH> <TH class=subh>Upgrade:</TH></TR> <TR> <TD>Level <? echo $user->currentSentrySkill?></TD> <? $pris=pow(2,$user->currentSentrySkill)*12000;?> <TD align=middle><INPUT type=submit size=5 value="<? numecho($pris)?> Gold" name=sentryupgrade> <INPUT type=hidden value=yes name=upgrade_sentry></TD></TR></TBODY></TABLE><INPUT type=hidden value=93aa2b6a02603399396203313b45827e name=hash> </FORM></TD> <TD> <FORM action=train.php method=post>

Thanx

First of all, clean up your HTML a bit. Literal attribute values with no quotes is not only a bad habit, but could screw up your script.

Secondly:

  • What errors are you getting?
  • What have you tried to solve these problems?
  • Did you search the internet, and if so, which results did you get (and why did they not solve your problem)?
<? numecho($pris)?>

should be <? numecho($pris);?>

numecho is not a standard PHP function btw. I hope it’s been defined within the scope of your script.

hi guys…

theanx for the answers… i will try… but the error function that the player can’t upgarde the opition through click the botton

Here the upgarde code:

<TD>Level <? echo $user->currentSentrySkill?></TD> <? $pris=pow(2,$user->currentSentrySkill)*12000;?> <TD align=middle><INPUT type=submit size=5 value="<? numecho($pris)?> Gold" name=sentryupgrade> <INPUT type=hidden value=yes name=upgrade_sentry></TD></TR></TBODY></TABLE><INPUT type=hidden value=93aa2b6a02603399396203313b45827e name=hash> </FORM></TD>

Thanx again!

Sponsor our Newsletter | Privacy Policy | Terms of Service