Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Making a LiveTicker in php & mySQL (newb alert)
Old 04-03-2005, 08:34 AM Making a LiveTicker in php & mySQL (newb alert)
Junior Talker

Posts: 2
Trades: 0
Hi there,

I am currently making a LiveTicker in php. LiveTicker is a dynamic website that shows live scores of soccer matches.
I am mostly done with the main web interface (the one that shows the matches and the scores). Now I am building the Admin interface, where you are able to add matches, delete matches, and most important: alter match score. The last one is the biggest part of the entire program, and it's there I have problems.

I have the following mySQL tables:
matches (matchID, hometeamID, awayteamID, homescore, awayscore)

The table contains matches. In the "alter match" interface, only the last two fields need to be changed.


What I want to do in the "alter match" interface is this:
First I choose a allready made match by using a ComboBox. I then press a button wich reads the selected match data and fills the input fields below with the score data. When I change the data, I press the Update button, and the new data is updated to the tables.

What is the best way to do this? I know how to get data from a table and put them into variables, but how do I take those variables and make them go into the input fields - so that the input fields (text boxes) are automaticly filled out once I chooe a match from the combo?

Thanks in advance
I hople you understand what I want to do, please ask if you don't understand something.
Maniac is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 04-03-2005, 02:59 PM
HitSnapper.com's Avatar
Extreme Talker

Posts: 154
Location: England, UK
Trades: 0
Make the text boxes have a value= in them and this should equal whatever the variable is that is pulled from the database so something like

<?php if (isset($homescore)) { echo "value=$homescore"; } ?>

This would make sure that if the variable $homescore was set, it would output it into the text field. This code needs to be within the <input> tags

Craig
HitSnapper.com is offline
Reply With Quote
View Public Profile Visit HitSnapper.com's homepage!
 
Reply     « Reply to Making a LiveTicker in php & mySQL (newb alert)
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.55521 seconds with 12 queries