vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Advanced php Help with a Custom Modified Hack. (https://vborg.vbsupport.ru/showthread.php?t=65826)

SaN-DeeP 06-04-2004 02:03 PM

Advanced php Help with a Custom Modified Hack.
 
Hi All,

I am getting this error.

Parse error: parse error, expecting `T_VARIABLE' or `'$'' in /home/sandeep/public_html/rock-ya-baby/0v0/myrig.php on line 157

my line 157 is here:
PHP Code:

     INSERT INTO " . TABLE_PREFIX . "myrig_users (useridtextprocessor_typecpu_speedoced_speedmobo_manfmobo_modelmemoryvideo_cardvideo_chipset3DMark_2001SE3DMark_2003Aquamark ,lastactivityVALUES ($id'" . addslashes($text) . "''" . addslashes($processor_type) . "''" . addslashes($cpu_speed) . "''" . addslashes($oced_speed) . "''" . addslashes($mobo_manf) . "''" . addslashes($mobo_model) . "''" . addslashes($memory) . "''" . addslashes($video_card) . "''" . addslashes($video_chipset) . "''" . addslashes($3DMark_2001SE) . "''" . addslashes($3DMark_2003) . "''" . addslashes($Aquamark) . "''" . time() . "'


Xenon 06-04-2004 02:21 PM

hmm, i cannot see anything wrong there

can you please post 5 lines before and after that line as well, maybe it's just something simple somewhere else :)

SaN-DeeP 06-04-2004 02:28 PM

Quote:

Originally Posted by Xenon
hmm, i cannot see anything wrong there

can you please post 5 lines before and after that line as well, maybe it's just something simple somewhere else :)

thnx for quick reply xenon
i am customized the vbgarage mod

here are some more lines

PHP Code:

 $result_user $DB_site->query("
   SELECT * FROM " 
TABLE_PREFIX "myrig_users WHERE userid = $id
  "
);
 
  
$user $DB_site->fetch_Array($result_user);
 
  if (empty(
$user)) {
   
$DB_site->query("
    INSERT INTO " 
TABLE_PREFIX "myrig_users (userid, text, processor_type, cpu_speed, oced_speed, mobo_manf, mobo_model, memory, video_card, video_chipset, 3DMark_2001SE, 3DMark_2003, Aquamark ,lastactivity) VALUES ($id, '" addslashes($text) . "', '" addslashes($processor_type) . "', '" addslashes($cpu_speed) . "', '" addslashes($oced_speed) . "', '" addslashes($mobo_manf) . "', '" addslashes($mobo_model) . "', '" addslashes($memory) . "', '" addslashes($video_card) . "', '" addslashes($video_chipset) . "', '" addslashes($3DMark_2001SE) . "', '" addslashes($3DMark_2003) . "', '" addslashes($Aquamark) . "', '" time() . "')
   "
);
  }
  else
  {
   
$DB_site->query("
    UPDATE " 
TABLE_PREFIX "vbgarage_users SET text = '" addslashes($text) . "', processor_type = '" addslashes($processor_type) . "', cpu_speed = '" addslashes($cpu_speed) . "', oced_speed = '" addslashes($oced_speed) ."',mobo_manf = '" addslashes($mobo_manf) ."', mobo_model = '" addslashes($mobo_model) ."', memory = '" addslashes($memory) ."', video_card = '" addslashes($video_card) ."', video_chipset = '" addslashes($video_chipset) ."', 3DMark_2001SE = '" addslashes($3DMark_2001SE) ."', 3DMark_2003 = '" addslashes($3DMark_2003) ."', Aquamark = '" addslashes($Aquamark) ."', lastactivity = '" time() . "' WHERE userid = $id
   "
);
  }
 
  
$result_image $DB_site->query("
   SELECT myrigid,name FROM " 
TABLE_PREFIX "myrig_images WHERE userid = $id
  "
); 

i am trying to make something like this
http://forums.extremeoverclocking.com/myrig.php


Pseudomizer 06-04-2004 02:30 PM

Quote:

Originally Posted by SaN-DeeP
Hi All,

I am getting this error.

Parse error: parse error, expecting `T_VARIABLE' or `'$'' in /home/sandeep/public_html/rock-ya-baby/0v0/myrig.php on line 157

my line 157 is here:
PHP Code:

     INSERT INTO " . TABLE_PREFIX . "myrig_users (useridtextprocessor_typecpu_speedoced_speedmobo_manfmobo_modelmemoryvideo_cardvideo_chipset3DMark_2001SE3DMark_2003Aquamark ,lastactivityVALUES ($id'" . addslashes($text) . "''" . addslashes($processor_type) . "''" . addslashes($cpu_speed) . "''" . addslashes($oced_speed) . "''" . addslashes($mobo_manf) . "''" . addslashes($mobo_model) . "''" . addslashes($memory) . "''" . addslashes($video_card) . "''" . addslashes($video_chipset) . "''" . addslashes($3DMark_2001SE) . "''" . addslashes($3DMark_2003) . "''" . addslashes($Aquamark) . "''" . time() . "'


Variables should not start with a number. Your variables 3Dblabla are the problem. Replace it or add something before it. That will solve your problem.

Cheers,

Xenon 06-04-2004 02:56 PM

exactly.

in the next query line, there are these vars also, so when you replace every instance of $3d_blabla with for example $blabla_3D it should work :)

SaN-DeeP 06-04-2004 02:58 PM

Quote:

Originally Posted by Pseudomizer
Variables should not start with a number. Your variables 3Dblabla are the problem. Replace it or add something before it. That will solve your problem.

Cheers,

https://vborg.vbsupport.ru/external/2004/06/3.gif Pseudomizerhttps://vborg.vbsupport.ru/external/2004/06/3.gif

Thnx a ton man :) http://www.tech-arena.com/forums/ima...s/thankyou.gif

Fixed the problem :)

Warm Regards,
Sandy...

SaN-DeeP 06-04-2004 02:59 PM

Quote:

Originally Posted by Xenon
exactly.

in the next query line, there are these vars also, so when you replace every instance of $3d_blabla with for example $blabla_3D it should work :)

thnx xenon
yea it works now ;)

REgards,
Sandy....

Xenon 06-04-2004 03:00 PM

:)

you're welcome :)

btw. nice smilies ^^

SaN-DeeP 06-06-2004 04:33 PM

i have made the database part and the php files
but facing some problems.

if some advanced coders can help me here.
i would appreciate

i will send u the files i have made.
both which create the db and also the one which displays the rig.

if someone interested please reply. and possibly if u can PM me ur yahoo/msn too

Regards,
Sandy...


All times are GMT. The time now is 04:53 AM.

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.01686 seconds
  • Memory Usage 1,770KB
  • 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
  • (3)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete