Jump to content

Easy Question


N-Bomb(Nerd)

Recommended Posts

I haven't messed with PHP in a long time.. but a friend asked for a project and I'm nearly complete.. just stumped on one thing.

 

I'm trying to make a registration page for his website, and using post to self validate on my own form.. however I'm trying to replace any validated values back into their text field.. I'm trying to figure out the best way to make the input safe enough to put back into the text field.. but still have their original value?

 

Like I said it's been a long time since I've done anything like this and I've totally forgot.. basically just looking for a secure way of putting a value back into it's field.

 

Ideas/Suggestions?  ;D

Link to comment
https://forums.phpfreaks.com/topic/193310-easy-question/
Share on other sites

A cookie?

 

I suppose a cookie would be a way to store the value, however that isn't exactly what I'm needing.

 

I have a registration form I'm making and people are able to put in code into the text fields and break my form and insert whatever code they want. I'm looking for a way to stop that from happening..

Link to comment
https://forums.phpfreaks.com/topic/193310-easy-question/#findComment-1018007
Share on other sites

what do u mean by the code..

try using the htmlspecialchars() while fetching the data from the form..

even they enter the code it will get fetched to u in what ever way they have entered..

check these other articles also...

 

http://php.net/manual/en/function.htmlentities.php

http://www.php.net/manual/en/function.htmlspecialchars.php

http://www.php.net/manual/en/function.strip-tags.php

Link to comment
https://forums.phpfreaks.com/topic/193310-easy-question/#findComment-1019716
Share on other sites

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.