Solved

Variables in Url links....

Posted on 2003-11-17
3
419 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 30 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 20 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
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 …

695 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