Jump to content

Problems with retrieving values sent by a form... HELP ! :D


szuwi

Recommended Posts

Hi guys!

 

Its my first post on this great forum, so please be patient and correct me if necessary ;)

I have a form that displays data pulled from a database (sort of table / row update form). Unfortunately, database was created by non-technical people and it shows... One of the columns is 'Unique number', so when submitted, it appears in the url as Unique+number=13435454. When trying to retrieve it using $_REQUEST['Unique number'] it always returns an empty value... All the other varibles sent (one word named) can be retrieved without any issues, just this one refuses to cooperate. Any ideas ?

 

Second issue, very frustrating one, is this:

in the same database there are shop banners + some scripts stored, in a form of e.g.

 

<script language="javascript">

var uri = 'http://impgb.tradedoubler.com/imp/img/101846/1016705?' + new String (Math.random()).substring (2, 11);

document.write('<a href="http://trac'+'ker.tradedoubler.com/click?p=898&a=1016705&g=101846" target="_blank"><img src="'+uri+'" border=0></a>');

</script>

 

or

 

<!--START MERCHANT:merchant name Karaoke Island from affiliatewindow.com.-->

<a href="http://www.awin1.com/cread.php?s=6983&v=382&q=4033&r=23948"><img src="http://www.awin1.com/cshow.php?s=6983&v=382&q=4033&r=23948" border="0"></a>

<!--END MERCHANT:merchant name Karaoke Island from affiliatewindow.com-->

 

When pulled from a db and displayed in a table, rather than text it actually shows the image (banner) with partial text. How could I go round it ? Need to be able to have it as text, otherwise when trying to update particular row, I am loosing the banner links... Best solution would be similiar to the one that php2myadmin uses, so when ediring the row all data pulled is a raw text. Also, even if I got it as a text, how am I supposed to post it ? Would I have to encode it or something ?

If you need more information, let me know guys. I am coding in Java on daily basis, this PHP game is new to me, you can probably tell... ;D

Thanks for any input !!!!!

 

Mike

 

 

Hello and welcome to the forums.

 

First issue can be fixed by changing your query to alias the colum name that is an issue

SELECT `Unique Number` as UniqueNumber....
Second issue - look into using htmlentities() on the string retunred from the database.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.