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
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"; 
?>

Link to comment
Share on other sites

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.