Jump to content

Greek Characters in PHP Parameters


skepsis80

Recommended Posts

Hi everybody,

 

I wrote a web service and I need to pass parameters through url in order to make a record in a mysql db. The problem is that when I insert greek characters in url it translates it to something like this http://xxxxxx.xx/test3.php?name=%CD%E9%EA%EF%F2&pass=234 and I got an error.

 

Does anybody have a suggestion? Please help because I search for this many hours and still nothing.

 

Thanks for your time

Link to comment
https://forums.phpfreaks.com/topic/234357-greek-characters-in-php-parameters/
Share on other sites

For better understanding the code is something like this

 

<?php 
$user_id = $_GET['name'];
$pass = $_GET['pass'];


mysql_connect("localhost", "xxxx", "xxxxxxxx") or die(mysql_error()); 

// Connects to your Database 
mysql_select_db("database1") or die(mysql_error()); 
$query = "INSERT INTO test(name,password) VALUES('$user_id', '$pass')";
mysql_query($query); 

Print "ok"; 
?>

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.