A few questions about of php
#1
ammm i create a plugin soo i habe a error but i cat find the error Sad

this is the error
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in C:\server\htdocs\inc\plugins\fastlogin.php on line 82

this is the line 82 of my php file
<sniped by walkman>

any can helpme to find the error??
Exclamation MyBB-Es.Com, spanish support for MyBB Wink
Reply
#2
Most likely you're getting this from a missing ; on a line above somewhere. Most likely the one RIGHT before.

Another option is mismatched quotes. Try cleaning up that mess you're calling a single line with proper line breaks and indentation.
Reply
#3
this is only a line

this is the fuction
<sniped by walkman>
Exclamation MyBB-Es.Com, spanish support for MyBB Wink
Reply
#4
Ok, so you've got mismatched quotes. And thats a variable, not a function.

But you're not escaping your ' characters inside the string. Notably the this.value='' needs to be this.value=\'\' for this variable to assign properly.

BUT, it would be a lot easier to read if you broke that "line" up into properly indented (for developer readability, since whitespace is ignored) code.

For example, half your original post's code:
<strong>
  <span class="smalltext">
    <b>Fast Login</b>
    &nbsp;
    <input type="text" class="textbox" name="username" title="{$lang->login_username}" value="{$lang->login_username}" onfocus="this.value=''" />
  </span>
</strong>

Not that it would have helped in this case, since we needed to know your variable's contents were surrounded by ' in order to know that you needed to escape the ' character inside your string.
Reply
#5
yeah thanks man ^^

and sorry for the code bad to read
Exclamation MyBB-Es.Com, spanish support for MyBB Wink
Reply
#6
You're welcome Big Grin

And hey, we all have to learn Wink
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)