Reply
How to do this?
Old 05-18-2007, 12:04 AM How to do this?
Skilled Talker

Posts: 60
Hi, will try and explain as easy as possible.

I have a php file the extracts data from a mysql table.

When it extracts it shows in a table.

The sql is select x x x from x x x where selections_id = 10

What I want to be able to do is insert a URL based on the selection and call it "Bet Now" in a column next to the "Win Price"

So, say you chose horse racing, Melbourne Cup. Melbourne cup is the sub category and has a subcategory_id = 10
When you chose that it then choses the maket and shows the odds.
What I want is in the end coloum to show "Bet Now" with a url link to //xxxxx.com/index.php?cPath=10&event_id=ALL&market_type_id=-#go_

What i need to know is how do I change the cPath=10 to the subcategory_id based on the selection.

To see it, go to http://www.plbet.com/horseracing.php
djjase is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
     
Old 05-18-2007, 07:00 AM Re: How to do this?
solomongaby's Avatar
Webmaster Talker

Latest Blog Post:
How Do You Find Music Online ?
Posts: 522
Name: Gabe Solomon
Location: Romania
please post the code ....
how are you printing the table ?
__________________
If you like my posts ... TK is appreciated:)
Web Directory | Blog
solomongaby is offline
Reply With Quote
View Public Profile Visit solomongaby's homepage!
 
Old 05-18-2007, 07:41 AM Re: How to do this?
Skilled Talker

Posts: 60
Name: bilton
please post the code to get complete help
niceguy_81333 is offline
Reply With Quote
View Public Profile
 
Old 05-21-2007, 12:30 AM Re: How to do this?
Skilled Talker

Posts: 60
I worked it out. thanks to those asking for the code. This is what I did

<?
$data_market = mysql_query($Query1,$dbh) or die(mysql_error());
$j=0;
while($ds1 = mysql_fetch_array($data_market))
{
$j++;
?>
<tr>
<td><?=$j?></td>
<td><?=$ds1[7]?></td>
<td><?=$ds1[8]?></td>
<td> <a href="<A href="https://www.xxxxx.com/index.php?cPath=<?=$ds1[5]?>&event_id=ALL&market_type_id=-#go_">Bet">https://www.xxxxx.com/index.php?cPath=<?=$ds1[5]?>&event_id=ALL&market_type_id=-#go_">Bet Now</a></td>
</tr>
djjase is offline
Reply With Quote
View Public Profile
 
Old 05-21-2007, 11:33 AM Re: How to do this?
damien_ls's Avatar
Ultra Talker

Posts: 432
Name: Damien
For future reference, posting code is a lot easier to read etc. if you put it in [ code ] or [ php ] blocks.
__________________
Layershift :: DDS & Dedicated, UK & USA-based Managed Virtuozzo VPS, Reseller & Shared Hosting
Experienced Parallels Platinum Partners (Plesk since 2001, Virtuozzo since 2004)
damien_ls is offline
Reply With Quote
View Public Profile
 
Old 05-21-2007, 09:02 PM Re: How to do this?
Skilled Talker

Posts: 60
Sorry - will do next time.
djjase is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to How to do this?
 

Thread Tools

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 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.12917 seconds with 13 queries