/    Sign up×
Community /Pin to ProfileBookmark

Create links from database data

Howdo All

Fairly new to php, and the site I am doing is for mobile use.

Anyway I have all the static pages written in WML and they all work fine, now I want to access the SQL database I have and get some info.

The query reads a team name and a team no and will generate links to another page whihc will display data depending on the team no and I need to pass this data along in the link. I know the links is something like sitepage.com?team=’teamno’ but as the data is coming from a database I need the link to be something like : sitepage.com?team=.$RS[‘teamno’] but cant get this working.

This is the code I am using up till now :

[code=php]<p align=”center”>
<?php
while($RS = mssql_fetch_array($result))
{
echo ‘<a href=”teaminfo.php#Info”>’.$RS[‘name’].'</a><br/>’;
}
?>
</p>[/code]

Any help would be appreciated,

Graeme

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@jasonahouleMar 26.2007 — Here, try this...
<i>
</i>echo '&lt;a href="teaminfo.php?team='.$RS['name'].'"&gt;'.$RS['name'].'&lt;/a&gt;&lt;br/&gt;';
Copy linkTweet thisAlerts:
@ZerocoolauthorMar 26.2007 — Cheers - thats got it

Just could not remember the format.

I prefer ColdFusion, but unfortunatley cant get funding for it.

Hence PHP - free!!

Cheers Again
×

Success!

Help @Zerocool spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...