?
Solved

Variables in Url links....

Posted on 2003-11-17
3
Medium Priority
?
422 Views
Last Modified: 2008-03-06
Hi I am a newbie to PHP...

I like to know how I place a link in Call field below

while ($row = mysql_fetch_assoc($result)) {
echo "<tr><TD BGCOLOR=\"#CCCCCC\">",$row['Call'], "</td><TD BGCOLOR=\"#CCCCCC\">", $row['Title'],"</td><TD BGCOLOR=\"#CCCCCC\">", $row['Author'],"</td></tr>\n";
}

i want to put a link for $row['Call']  

something like this:

<a href="http://somelink.com.au/RNO?Call=$row['Call']">

Cheers

and thanx in advance
0
Comment
Question by:baz_can_fix_it
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 20

Accepted Solution

by:
Muhammad Wasif earned 120 total points
ID: 9769260
try this
echo "<a href='http://somelink.com.au/RNO?Call=".$row['Call']."'>Your Link</a>";

WASIF
0
 
LVL 19

Assisted Solution

by:Michael701
Michael701 earned 80 total points
ID: 9769266
that looks good

notes: with php4 globals are turned off, in your next page you have to use

echo $_GET['Call']; // WaTcH out for upper/lower case variable names

or you may use the import function, but this allows hackers to set variables in your code, if you don't initialize them it could have adverse effects.

 import_request_variables('g');


also checkout these functions

function clean_post($string)
{
  $string = trim(htmlspecialchars(stripslashes($string), ENT_QUOTES));
  return $string;
}
0
 
LVL 1

Author Comment

by:baz_can_fix_it
ID: 9774679
Thanx  wasifg... Spot On...exactly what I wanted... excelllent answer

Michael701 thank you too for the extra tip... :)

Could you both do me a favour see if you can answer me other question on this page... :)

Cheers

http://www.experts-exchange.com/Web/Web_Languages/PHP/Q_20799763.html#9763780


Thank you in advance
0

Featured Post

WordPress Tutorial 4: Recommended Plugins

Now that you have WordPress installed, understand the interface, and know how to install new parts, let’s take a look at our recommended plugins.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Suggested Courses

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question