Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 Programming Discussions

Reply
 
Thread Tools Display Modes
  #1  
Old 05-16-2010, 11:49 AM
danishravian danishravian is offline
 
Join Date: Mar 2010
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default how to make a full PHP and Mysql enabled page

i want to make a page at my vbulletin site.
where user may search some data and then i am to display records.

can you please tell me how it can be done ???

see this link to have full idea of my problem.

http://www.haveelskere.dk/page.php?do=2
Reply With Quote
  #2  
Old 05-17-2010, 01:27 AM
bpr bpr is offline
 
Join Date: Dec 2009
Location: London
Posts: 57
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

have a look at that:
http://ragtek.org/blog/vbulletin/vbu...asse-benutzen/
Reply With Quote
  #3  
Old 05-17-2010, 11:19 AM
danishravian danishravian is offline
 
Join Date: Mar 2010
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

http://www.haveelskere.dk/page.php?do=2

this is my html page.This form will be submitted to a PHP page which will search data from
database and will diplay data.
How It Can Be Done ?

i added this custom page with mod available on this forum to add 5 custom pages on your forum.:erm:
Reply With Quote
  #4  
Old 05-18-2010, 01:47 PM
danishravian danishravian is offline
 
Join Date: Mar 2010
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i made my custome page by some tutorial posted on this.
now i want to display some data on it through PHP.

all i got till now is that data is currently comming from Template???
can you please tell me where to write my php code??
Reply With Quote
  #5  
Old 05-18-2010, 01:58 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You write your php code in your custom php page.

Why do you keep starting new threads about this same topic? You get replies and then you go start a new thread. Please keep it all in one thread instead of starting another. I've just merged the last three threads you've started about this subject together.
Reply With Quote
  #6  
Old 05-18-2010, 02:18 PM
danishravian danishravian is offline
 
Join Date: Mar 2010
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lynne View Post
You write your php code in your custom php page.
I wrote it there but it is dislpaying my data outside the template.
http://haveelskere.dk/test.php
kindly have a look on it.

Quote:
Originally Posted by Lynne View Post
Why do you keep starting new threads about this same topic? You get replies and then you go start a new thread. Please keep it all in one thread instead of starting another. I've just merged the last three threads you've started about this subject together.
I made threads but no one replies, thats why i made a new thread !!!! sorry, if it annoys you. but i am not getting something proper. i am playing with my code from 5 days.
Reply With Quote
  #7  
Old 05-18-2010, 02:25 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

1) Post your code or nobody can tell what you are doing wrong. It looks to me like you are using echo which is not going to put the text where you want it.

2) Sorry, but just because you don't get a response does not mean you should go make another thread about the same thing. People will help if they can. This is an all volunteer run site, so people help out when they have time.
Reply With Quote
  #8  
Old 05-18-2010, 02:27 PM
danishravian danishravian is offline
 
Join Date: Mar 2010
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

this is my code
include "connect.php";
$query = "select * from plants";
$result = mysql_query($query);
$row = mysql_fetch_array($result);


$templater->register('query', $query);
$templater->register('result', $result);
$templater->register('row', $row);


if(mysql_num_rows($result) > 0)
{
while($row = mysql_fetch_array($result))
{

echo "data found";

}

}

else
{
echo "No Record With These Parameters";

}
Reply With Quote
  #9  
Old 05-18-2010, 02:39 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you are making a custom page, then you should be following a tutorial such as this one - [HOW TO - vB4] Create your own vBulletin page. The above cannot be all of your code, because I can see it is in a vbulletin like page, so there much have been more to it than what you posted. You should post your page/php in php tags and then post your templates in html tags so that it is easier for us to read.
Reply With Quote
  #10  
Old 05-18-2010, 02:54 PM
danishravian danishravian is offline
 
Join Date: Mar 2010
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I made my page in same way...

only problem i am getting is that
"Data Is being Displayed Outside Template"

http://haveelskere.dk/test.php

please have a look at this link.
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 10:25 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.05192 seconds
  • Memory Usage 2,251KB
  • 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
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete