Ethic Solutions Free Webmaster Tools
     
Webmaster Discussion Forum -  Revenue Sharing Forum  webmaster talk related topic
Revenue Sharing Blog - Create your own
Create your own blog FREE and get 80% Revenue directly from google
Earn more revenue on our site, it's free!

» Free SEO Tools
» Check Page Rank
» Check Page Rank multi datacenter
» Check Fake Page Rank
» Alexa Traffic Rank
» Bulk Page rank Check
» Link Popularity
» Check domain Instantly
» Short url
» MD5 Encrypt
» Meta Tags Extractor
» Surf using Proxy
» Keyword Density Analyzer
» Keyword Analyzer
» Welcome to WMH
Registration at WebmastersHome is completely FREE and takes only a few seconds. By registering you'll gain:
  • Full Posting Privileges.
  • Access to Private Messaging.
Register now
Partner

Text Link Ads
Web Hosting
Flash Tutorials
PHP Scripts
Web Hosting providers
Offshore Software Outsourcing
Web Directory
Software Directory
Your Text Link
Earn More
Simply Add a Post and view ad network advertisement on this post.


Go Back   Webmaster Discussion Forum - Revenue Sharing Forum webmaster talk related topic > Design and Programming Talk > Client & Server Side Scripting


PHP database

Client & Server Side Scripting


Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-14-2005, 01:14 PM
nikhiltechnology nikhiltechnology is offline
Senior Member
 
Join Date: May 2005
Location: Indore, India
Posts: 185
nikhiltechnology is on a distinguished road
iTrader: (0)
Default PHP database

Hello Friends

Here is a rough outline of what I'm trying to do I have a database that pulls from several tables to post a question and answer in a form format. the user then selects and answer and hits the submit button. The script will then tally the results and pop up a referance to the manual on where the answer can be found if the question is wrong and if correct continue on to the next question. Where the problem lies is pulling the next question upon user hitting the submit button general work flow is like the following.

1.Question printed through PhP scripting in form format
2.User input and submittal
3. Next question and answer set retrieved and printed in same window
4. end if end of records in the database

Now the problem I'm having is one I can do any inline scripting on the form action line like such


Code:
print ("<Form action ='<?php PrintQuestion($result) ?>' method = post>");


this simply pops up and error I also thought about doing a persistant connection to the data base and just putting my function in a seperate file so I could do a call like this.

Code:
print('<Form action = "calldatabase.php" method ="post">');


The problem with this is the database connection whether its permenint or not closes at the end of the script so all I would get would be the first record over and over again which dosent help my situation at all. I need to be able to pull one record wait for a response then pull the next record in sequence can anyone give me any advise on how to achieve this.

Thanks
Reguards
Nikhil
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Revenue Sharing Ads ( Read More ):

  #2 (permalink)  
Old 07-15-2005, 07:56 AM
jitender's Avatar
jitender jitender is offline
Site Admin
 
Join Date: Jun 2004
Posts: 1,197
jitender has a spectacular aura aboutjitender has a spectacular aura aboutjitender has a spectacular aura about
iTrader: (0)
Default

hi nikhil,


open a pop with form in php file and get the data in php,

use connection file in used php file

PHP Code:
include("connectionfile.php"); 


if you get the error in connection please check the connectin first

PHP Code:
$conn mysql_connect('mysql_host''mysql_user''mysql_password')
   or die(
'Could not connect: ' mysql_error());
echo 
'Connected successfully';
mysql_select_db('my_database') or die('Could not select database'); 


after complete the function close it

Regards
Jitender
__________________
Free Webmaster Tools - Free SEO Tools
phpLDHacks - Add your template or Hack and earn money
Text Link Ads - Buy & Sell text link ads
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 08:07 AM.


Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.0.0