Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
  #1  
Old 06-04-2004, 03:03 PM
SaN-DeeP's Avatar
SaN-DeeP SaN-DeeP is offline
 
Join Date: Jun 2002
Location: Mumbai, India
Posts: 1,195
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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() . "'
Reply With Quote
  #2  
Old 06-04-2004, 03:21 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #3  
Old 06-04-2004, 03:28 PM
SaN-DeeP's Avatar
SaN-DeeP SaN-DeeP is offline
 
Join Date: Jun 2002
Location: Mumbai, India
Posts: 1,195
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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

Reply With Quote
  #4  
Old 06-04-2004, 03:30 PM
Pseudomizer's Avatar
Pseudomizer Pseudomizer is offline
 
Join Date: Mar 2002
Location: Germany
Posts: 614
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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,
Reply With Quote
  #5  
Old 06-04-2004, 03:56 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #6  
Old 06-04-2004, 03:58 PM
SaN-DeeP's Avatar
SaN-DeeP SaN-DeeP is offline
 
Join Date: Jun 2002
Location: Mumbai, India
Posts: 1,195
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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,
Pseudomizer

Thnx a ton man

Fixed the problem

Warm Regards,
Sandy...
Reply With Quote
  #7  
Old 06-04-2004, 03:59 PM
SaN-DeeP's Avatar
SaN-DeeP SaN-DeeP is offline
 
Join Date: Jun 2002
Location: Mumbai, India
Posts: 1,195
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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....
Reply With Quote
  #8  
Old 06-04-2004, 04:00 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default



you're welcome

btw. nice smilies ^^
Reply With Quote
  #9  
Old 06-06-2004, 05:33 PM
SaN-DeeP's Avatar
SaN-DeeP SaN-DeeP is offline
 
Join Date: Jun 2002
Location: Mumbai, India
Posts: 1,195
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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...
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:47 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04383 seconds
  • Memory Usage 2,276KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (3)bbcode_php
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (9)postbit
  • (9)postbit_onlinestatus
  • (9)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete