Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Variables in Url links....

Posted on 2003-11-17
3
Medium Priority
?
425 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

These days socially coordinated efforts have turned into a critical requirement for enterprises.
This article discusses how to implement server side field validation and display customized error messages to the client.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses

610 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