CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 External Link With Parameters in DB

Print topic Send  topic

Author Message
Koren

Posts: 83
Posted: 08/20/2007, 9:15 PM

I have had no luck creating external links that HAVE parameters in the DB. Let me try to be more clear.
I have a form in which the user can enter their web site address (fully featured with a smashing error control to check www preface). I am seeing that some of these web addresses require parameters to be sent along with the root URL to get to the correct destination. When I create the lovely external link, I have my handy dandy $Component->SetLink("http://".$Component->GetLink()); all raring to go; I have my Preserve Parameters set to NONE (I really tried both NONE and GET no difference); Convert URL set to NONE. All seems fine for regular URLS in the DB and then BLAMO- I come across a URL with a parameter (ie www.mmm_mm_good.com?test=32) and the link that is generated puts a " / " right before the " ? ". (i.e. it produces" http://www.mmm_mm_good.com/?test=32 ") which just doesn't work very smoothly as you can imagine. Any insight would be SUPER!!
Thanks so much!
View profile  Send private message
wkempees
Posted: 08/21/2007, 4:04 AM

First remark :
$Component->SetLink("http://".$Component->GetLink());
Use single quotes
Second remark
Your URL is being interpreted, clearly it is escaping the questionmark.
Something to do with either the field setting, try HTML
Or the use of ToSQL

I would check the settings of the Component, HTML.
Check the content of the database field, is the slash already there? Because
then it is upon entering the URL data that the questionmark is escaped.

Walter

"Koren" <Koren@forum.codecharge> schreef in bericht
news:546ca66caec7cb@news.codecharge.com...
>I have had no luck creating external links that HAVE parameters in the DB.
>Let
> me try to be more clear.
> I have a form in which the user can enter their web site address (fully
> featured with a smashing error control to check www preface). I am seeing
> that
> some of these web addresses require parameters to be sent along with the
> root
> URL to get to the correct destination. When I create the lovely external
> link, I
> have my handy dandy $Component->SetLink("http://".$Component->GetLink());
> all
> raring to go; I have my Preserve Parameters set to NONE (I really tried
> both
> NONE and GET no difference); Convert URL set to NONE. All seems fine for
> regular
> URLS in the DB and then BLAMO- I come across a URL with a parameter (ie
> www.mmm_mm_good.com?test=32) and the link that is generated puts a " / "
> right
> before the " ? ". (i.e. it produces" http://www.mmm_mm_good.com/?test=32
> ")
> which just doesn't work very smoothly as you can imagine. Any insight
> would be
> SUPER!!
> Thanks so much!
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.yessoftware.com/
>

Koren

Posts: 83
Posted: 08/21/2007, 8:17 AM

Good Morning Walter!
Quote :
$Component->SetLink("http://".$Component->GetLink());
Use single quotes
Fixed (no change) :-/

Quote :
I would check the settings of the Component, HTML
Changed to HTML (no change) :-/

Quote :
Check the content of the database field, is the slash already there?
Nope. Its just the way I need to be presented.

the use of ToSQL? if my db info is correct, then would there be a need to use ToSQL? Isn't that just for putting data into the DB?
View profile  Send private message
Koren

Posts: 83
Posted: 08/21/2007, 10:07 AM

OK never mind... I got it straight. I changed the MYSQL field to "text" (rather then varchar) and I played with all sorts of things. Then it occured to me to try an better TEST url. I noticed that a true url with parameter would need a slash and doc name, and perhaps that was a clue. SO I took my sample URL link "http://www.mmm_mm_good.com/?test=32" and added a fake doc name prior to the parameters:
http://www.mmm_mm_good.com/some_doc.php?test=32
AND SUCCESS! links work great. no more crazies!
Lesson Learned.
GOOD rule.. use GOOD samples!!
Thanks Walter
View profile  Send private message
wkempees
Posted: 08/21/2007, 10:39 AM

Well done!
I only noticed it after you pointed it out.
It was an invalid URL all together.
Oh well, blinded, the (addslashes()) wasn't such a bad idea.

Greets,
Walter

"Koren" <Koren@forum.codecharge> schreef in bericht
news:546cb1bd151f78@news.codecharge.com...
> OK never mind... I got it straight. I changed the MYSQL field to "text"
> (rather
> then varchar) and I played with all sorts of things. Then it occured to me
> to
> try an better TEST url. I noticed that a true url with parameter would
> need a
> slash and doc name, and perhaps that was a clue. SO I took my sample URL
> link
> "http://www.mmm_mm_good.com/?test=32" and added a fake doc name prior to
> the
> parameters:
> http://www.mmm_mm_good.com/some_doc.php?test=32
> AND SUCCESS! links work great. no more crazies!
> Lesson Learned.
> GOOD rule.. use GOOD samples!!
> Thanks Walter
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.yessoftware.com/
>


Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.