cybernet Posted November 2, 2008 Share Posted November 2, 2008 i have this in database.php function addNewUser($username, $password, $email){ $time = time(); /* If admin sign up, give admin user level */ if(strcasecmp($username, ADMIN_NAME) == 0){ $ulevel = ADMIN_LEVEL; }else{ $ulevel = USER_LEVEL; } $q = "INSERT INTO ".TBL_USERS." VALUES ('$username', '$password', '0', $ulevel, '$email', $time)"; return mysql_query($q, $this->connection); } but after this i want to do something else with the POST data do run this function $f = fopen("http://example.com/userService/userservice?type=add&secret=bigsecret&username=$username&password=$password&name=$username&[email protected]"); $response = fread($f, 1024); if (ereg('OK', $response)) { echo 'user was added successfully to database '; } else { echo 'cant add user to database'; } fclose($f); Link to comment https://forums.phpfreaks.com/topic/131099-fopen-a-litle-help-please/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.