PDA

View Full Version : help with widgets


robaiken
02-02-2010, 08:32 AM
hi,

i made a php widget. i keep getting this error

Parse error: syntax error, unexpected '{' in /var/www/clients/client4/web6/web/picbasic/packages/vbcms/widget/execphp.php(171) : eval()'d code on line 18

because of this line of code

<input type=\"hidden\" name=\"securitytoken\" value=".{vb:raw bbuserinfo.securitytoken}." />



$output = "
<form enctype=multipart/form-data action=".$_SERVER['PHP_SELF']."?".$session[sessionhash]." method=POST>
Please choose a file: <input name=ftpfile type=file id=ftpfile /><br><br>
<input name=ftpfileName type=hidden id=ftpfileName />

<select name=dir>
<option value=0>Select a Catagory</option>
<option value=1>Misc</option>
<option value=2>archive</option>
<option value=3>code</option>
<option value=4>executable</option>
<option value=5>image</option>
<option value=6>pdf</option>
</select>
<br /><br />

<input type=\"hidden\" name=\"s\" value=".$session[sessionhash]." />

<input type=\"hidden\" name=\"securitytoken\" value="{vb:raw bbuserinfo.securitytoken}" />

<input type=submit name=submit value=Upload File />
";

thank you

Rob

Lynne
02-02-2010, 08:18 PM
This line is not valid for a plugin:
<input type=\"hidden\" name=\"securitytoken\" value="{vb:raw bbuserinfo.securitytoken}" />
Try:
<input type=\"hidden\" name=\"securitytoken\" value=" .$bbuserinfo.securitytoken. " />