vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   dumb phpinclude error (https://vborg.vbsupport.ru/showthread.php?t=50994)

The_Cyberdemon 03-30-2003 11:18 AM

dumb phpinclude error
 
Well, i'm trying to make a quick registration hack (yeah, i know, it's probably been already made), and i see get an error when i put this in my phpinclude:

PHP Code:

if ($bbuserinfo[usergroupid]==1) {
$quickreg "<form action="vb/register.php" method="post">
<input type="
hidden" name="s" value="$session[sessionhash]">

<table cellpadding="
0" cellspacing="0" border="0" bgcolor="#0A293E"  width="95%" align="center"><tr><td>
<table cellpadding="4" cellspacing="1" border="0"  width="100%">
<!-- *** -->
<
tr>
    <
td bgcolor="#1D6AA0" colspan="2"><normalfont color="#EEEEFF" class="thtcolor"><b>Register</b></smallfont></td>
</
tr>
<!-- *** -->
<
tr>
    <
td bgcolor="#1C5780"><normalfont><b>User Name:</b></normalfont></td>
    <
td bgcolor="#1C5780"><normalfont><input type="text" class="bginput" name="username" size="5" maxlength="$maxuserlength"></normalfont></td>
</
tr>
<
tr>
    <
td bgcolor="#13486D"><normalfont><b>Password:</b></normalfont></td>
    <
td bgcolor="#13486D"><normalfont><input type="password" class="bginput" name="password" size="5" maxlength="15"></normalfont></td>
</
tr>
<
tr>
    <
td bgcolor="#13486D"><normalfont><b>Enter Password Again:</b></normalfont></td>
    <
td bgcolor="#13486D"><input type="password" class="bginput" name="passwordconfirm" size="5" maxlength="15"></td>
</
tr>
<
tr>
    <
td bgcolor="#1C5780"><normalfont><b>Email:</b></normalfont></td>
    <
td bgcolor="#1C5780"><normalfont><input type="text" class="bginput" name="email" size="5" maxlength="50"></normalfont></td>
</
tr>
<
tr>
    <
td bgcolor="#1C5780"><normalfont><b>Enter Email Again:</b></normalfont></td>
    <
td bgcolor="#1C5780"><normalfont><input type="text" class="bginput" name="emailconfirm" size="5" maxlength="50"></normalfont></td></tr><tr><td align="center"><input type="hidden" name="url" value="http://www.blindedstorms.com">
    <
input type="hidden" name="action" value="addmember">
    <
input type="submit" class="bginput" name="Submit" value="Submit">
    <
input type="reset" class="bginput" name="Reset" value="Reset"></td>
</
tr></table></table></form>";
} else {
$quickreg = "";


after i do that, i get this error at the top of the screen, and some others.

Quote:

Parse error: parse error, unexpected T_STRING in /home/cyber/public_html/vb/global.php(313) : eval()'d code on line 79
Any idea what to do?

Thanks in advance!

-Cyber

filburt1 03-30-2003 01:49 PM

You're not escaping any of the quotes.

Xenon 03-30-2003 08:17 PM

or in easier words:

change
PHP Code:

$quickreg "<form action="vb/register................</form>"; 

into
PHP Code:

$quickreg '<form action="vb/register................</form>'

(look at the single quotes leading and ending)

The_Cyberdemon 03-31-2003 12:05 AM

THanks, i'll try that and give you an update.

The_Cyberdemon 03-31-2003 12:14 AM

okay, the error seems to be fixed, but the variable won't show. I put in $quickreg in a portal-block thing, and all that shows up is $quickreg, not all the stuff. I have it as any html block. Any idea what i do?

If it's something like make a new template for the portal-home block, how would i do that and what would i do exactly?

filburt1 03-31-2003 01:23 AM

Make sure you're logged out. Also use $bbuserinfo['usergroupid'], not $bbuserinfo[usergroupid] which is deprecated.

The_Cyberdemon 03-31-2003 02:14 AM

Quote:

Make sure you're logged out. Also use $bbuserinfo['usergroupid'], not $bbuserinfo[usergroupid] which is deprecated.
I think you misunderstand the problem. The Variable shows up ($quickreg), not the registration fields. Could just the '' thingy ruin it?

Edit: Tried it and it didn't fix anything. my url is http://www.blindedstorms.com , the block is in the lower left.

g-force2k2 03-31-2003 03:08 PM

in the php make sure you eval the template...

ie:
PHP Code:

eval( "\$quickreg = \"".gettemplate'template_name_here' ).";" ); 

put that in the php instead of the variable $quickreg...

regards,
g-force2k2

filburt1 03-31-2003 04:48 PM

You don't have to eval it, especially because there are no replacements or variables in it from what I can see.

The_Cyberdemon 03-31-2003 06:39 PM

I guess i could try the eval thing, but what would the template name be? I'm just putting the variable in a box on the left side of the portal.


All times are GMT. The time now is 09:20 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01212 seconds
  • Memory Usage 1,771KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete