Jump to content

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


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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.