473,785 Members | 2,641 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

outtputting dynamic link in xml tag using php

hi,
i am trying to create an xml tag ref to hold link.php?id=1; or
link.php?id=2 and so on.
I want the links for all the fields(id) in the databse so that when i
call them in my html page for google maps i have the whole link.The
tag in the php page i am using is

echo 'ref="link.php? id='.$row['id'] . '"';
the tag in html is
<a href="+ref+">" +"more info"+ "</a>"

Link.php takes in the id and runs a query and displays results based
on id.

Please tell me if what i am doing is rite or wrong.Also what is the
best way for me to go ahead with this.
Thanking You,
Prashant Kalyanraman
Jun 30 '08
12 2837
prashant wrote:
On Jul 1, 3:45 am, Jerry Stuckle <jstuck...@attg lobal.netwrote:
>Jerry Stuckle wrote:
>>Geoff Berrow wrote:
Message-ID: <g4c9dn$7a...@r egistered.motza rella.orgfrom Jerry Stuckle
contained the following:
OK, I guess I don't understand just what you're trying to do then.
when you do
echo 'ref="link.php? id='.$row['id'] . '"';
You should get on your page (see the page source!)
ref="link.php?i d=42"
if $row['id'] is 42. Are you not getting this?
Perhaps he wants :
<a href="link.php? id=<?php echo $row['id']; ?>">more info</a>
Coule be, Jeff. I wish I knew. The code he has doesn't make a lot of
sense.
Sorry, I mean Geoff...

Too early in the morning :-)

--
============== ====
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck...@attg lobal.net
============== ====

sorry for not being clearer. the error is jus b4 county. i want to
display the output in xml form.

the output i get is
XML Parsing Error: not well-formed
Location: http://localhost/pra/newphpgend.php
Line Number 1, Column 119:<markers><m arker name="Newark, Memorial,
High" street="39375 Cedar Blvd." city="Newark" zip="94560"
ref="link.php?i d=1"county="Ala meda"

once agian my line of code is echo 'ref="link.php? id='.$row['id'] .
'"';
So you have an xml problem. To me it looks like you need a space before
country.

Otherwise - check an XML group with your source to determine what's
wrong with the xml itself. Then adjust your PHP code to fix it.

--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attgl obal.net
=============== ===

Jul 1 '08 #11
On Jul 1, 2:12 pm, Jerry Stuckle <jstuck...@attg lobal.netwrote:
prashant wrote:
On Jul 1, 3:45 am, Jerry Stuckle <jstuck...@attg lobal.netwrote:
Jerry Stuckle wrote:
Geoff Berrow wrote:
Message-ID: <g4c9dn$7a...@r egistered.motza rella.orgfrom Jerry Stuckle
contained the following:
OK, I guess I don't understand just what you're trying to do then.
when you do
echo 'ref="link.php? id='.$row['id'] . '"';
You should get on your page (see the page source!)
ref="link.php?i d=42"
if $row['id'] is 42. Are you not getting this?
Perhaps he wants :
<a href="link.php? id=<?php echo $row['id']; ?>">more info</a>
Coule be, Jeff. I wish I knew. The code he has doesn't make a lot of
sense.
Sorry, I mean Geoff...
Too early in the morning :-)
--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck...@attgl obal.net
=============== ===
sorry for not being clearer. the error is jus b4 county. i want to
display the output in xml form.
the output i get is
XML Parsing Error: not well-formed
Location:http://localhost/pra/newphpgend.php
Line Number 1, Column 119:<markers><m arker name="Newark, Memorial,
High" street="39375 Cedar Blvd." city="Newark" zip="94560"
ref="link.php?i d=1"county="Ala meda"
once agian my line of code is echo 'ref="link.php? id='.$row['id'] .
'"';

So you have an xml problem. To me it looks like you need a space before
country.

Otherwise - check an XML group with your source to determine what's
wrong with the xml itself. Then adjust your PHP code to fix it.

--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck...@attgl obal.net
=============== ===
thanx a lot for ur help i used a sql query and generated a dynamic
link using the concat command
Jul 2 '08 #12
prashant wrote:
On Jul 1, 2:12 pm, Jerry Stuckle <jstuck...@attg lobal.netwrote:
>prashant wrote:
>>On Jul 1, 3:45 am, Jerry Stuckle <jstuck...@attg lobal.netwrote:
Jerry Stuckle wrote:
Geoff Berrow wrote:
>Message-ID: <g4c9dn$7a...@r egistered.motza rella.orgfrom Jerry Stuckle
>containe d the following:
>>OK, I guess I don't understand just what you're trying to do then.
>>when you do
>>echo 'ref="link.php? id='.$row['id'] . '"';
>>You should get on your page (see the page source!)
>> ref="link.php?i d=42"
>>if $row['id'] is 42. Are you not getting this?
>Perhaps he wants :
><a href="link.php? id=<?php echo $row['id']; ?>">more info</a>
Coule be, Jeff. I wish I knew. The code he has doesn't make a lot of
sense.
Sorry, I mean Geoff...
Too early in the morning :-)
--
============ ======
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck...@at tglobal.net
============ ======
sorry for not being clearer. the error is jus b4 county. i want to
display the output in xml form.
the output i get is
XML Parsing Error: not well-formed
Location:http://localhost/pra/newphpgend.php
Line Number 1, Column 119:<markers><m arker name="Newark, Memorial,
High" street="39375 Cedar Blvd." city="Newark" zip="94560"
ref="link.php ?id=1"county="A lameda"
once agian my line of code is echo 'ref="link.php? id='.$row['id'] .
'"';
So you have an xml problem. To me it looks like you need a space before
country.

Otherwise - check an XML group with your source to determine what's
wrong with the xml itself. Then adjust your PHP code to fix it.

--
============== ====
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck...@attg lobal.net
============== ====

thanx a lot for ur help i used a sql query and generated a dynamic
link using the concat command
My advice still stands, no matter how you generate the link.

--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attgl obal.net
=============== ===

Jul 3 '08 #13

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
1733
by: Danny | last post by:
How do you guys make listings such as product listings and their detail pages more crawler friendly, if they are genrated using dynamic asp pages. If your ASP uses a format like this: www.mysite.com/products.asp?idnum=3444 to display detail pages, how can I apply SEO to this format?? I know unix hosts use the mod rewrite, but I do not have access to the server settings etc. BUt I can access a database etc. What are your thoughts?
4
4646
by: Daniel Keller | last post by:
Hello! I'm trying to set up a page system using "dynamic" SSI. That means that I normally use the following on my website: <!--#include virtual="file.inc" --> Now I want to make this "dynamic" and I don't have a clue how to do so. I want to link to a file using something like this: <a href="file.shtml?dynamic">Link</a>
6
2924
by: MikeY | last post by:
Hi Everyone, Does anyone know where I can get my hands on a sample with source code of a simple dynamic button control in C# Windows form. I am looking for a sample that uses a class library that sets the properties send/passed from the main windows form. I'm having problems with the class library, the button control collection and my referencing it ie this.Control.Add(aControl);. Any and all help is appreciated. Thanks in advance.
3
1864
by: WebBuilder451 | last post by:
I have a series of dynamic link buttons created based upon a datareader. I've added a click event and it calls the sub ok: example: "while loop through the reader" Dim ltrCtrl As New LiteralControl Dim lbtnCtrl As New LinkButton ltrCtrl.Text = "<br>" lbtnCtrl.Text = "WE: " & dtrCal(10).ToString lbtnCtrl.ToolTip = dtrCal(10).ToString & " these events" & dtrCal(1) lbtnCtrl.ID = "wecc" & i.ToString
2
6359
by: JWL | last post by:
Hi I need to create a bunch of sites with slightly dynamic CSS. Basically, all the image paths in the CSS need to be dynamic, depending on the values of certain ASP variables. I can think of 3 ways to do this: 1. Write a script to create a semi-dynamic CSS file, which will be run whenever we need to make changes to the ASP variables controlling the
5
3177
by: pittendrigh | last post by:
There must be millions of dynamically generated html pages out there now, built by on-the-fly php code (and jsp, perl cgi, asp, etc). Programatic page generation is transparently useful. But querying a database, negotiatinig lots of if-then-else logic and echo'ing html code out on port 80 every time a page is requested has to be a huge waste of resources. Why not use that logic to print static html instead of dynamic?
12
9508
by: Lazoris | last post by:
OK heres a newb question and I'm sorry for it, but im getting back into web design after like 5 years off and im stuck even though i should know the problem i cant seem to correct it atm. What I'm trying to do is create a page that pulls up a list of items in a DB page, lists the items and creates a dynamic link using the item_id making the item_name a link to a more detailed page. So that when they click the Item_name it uses the item_id...
2
1963
by: David W | last post by:
I need to include a style sheet link in the aspx page based on what user they are. Basically this functionality, but using code behind. Any idea how to change this line to code behind? This breaks once we include an AJAX control on the page. <head runat="server"> <link href="/textfiles/style<%= Session("partner_id") %>.css" rel="stylesheet" type="text/css">
3
3702
by: saritha2008 | last post by:
Hi, As part of migrating bugs from JIRA to BugZilla, below is the requirement: If there are multiple “version” tags in my input.xml file For open bugs (Resolved,Reopened,Inprogress,NeedInfo) > create multiple bugs, one for each “version". “Fix version” will be empty. For closed bugs > create multiple bugs, one for each “Fixed in” version. Use earliest “version" for all bugs. I tried using the apply-template in the XSLT for the above...
0
9645
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9480
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10148
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9950
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8972
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7499
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6740
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2879
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.