Jump to content

Encode


suck4it

Recommended Posts

Hi so I have a problame I need to encode like this .base64_encode(pack('H*', sha1($_POST['p']))). when I putting it into mysql everything works fine, but when I try to do like this:

$a=".base64_encode(pack('H*', sha1($_POST['p'])))."; I getting this error

syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING.

So any suggestions? :)

Link to comment
https://forums.phpfreaks.com/topic/146356-encode/
Share on other sites

Wooops sorry missed that.. ;D Well thanks now error have beend fixed, but encode won't work..

When I put to the mysql like that: VALUES ('$r', '".base64_encode(pack('H*', sha1($_POST['p'])))."', '$ip')"); everything works great, but now I need to check is password correct so I have to encode posted password and compare it with one from mysql, but it's don't work and I don't know how to fix it.. ;/ So does any1 have more suggestions? :-)

Link to comment
https://forums.phpfreaks.com/topic/146356-encode/#findComment-768415
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.