Login Form

Whether you are using Linux on the desktop or as a server, it's still good that you're using Linux. Linux related questions go here.

Moderator: General Moderators

Post Reply
parshuramsk
Forum Newbie
Posts: 1
Joined: Tue Apr 17, 2007 3:49 am

Login Form

Post by parshuramsk »

Hi

I am writing a login page using php in linux. I am getting a problem.


Problem Description:


I have C file which checks user name and password & returns value

When I execute C file it gives proper/required output.

I am using the executable of this file in a shell script. My shell script is log_in.sh following is its content.

Code: Select all

[root@locuzhpc Programs]# cat log_in.sh

uname=$1
passwd=$2
/var/www/html/Locuz/Programs/ULogin  $uname  $passwd
RET=$?
echo $RET
This Shell script Iam using in login-test.php file. My

login-test.php file content is


Code: Select all

[root@locuzhpc PHP]# cat login-test.php


<?php

system("sh /var/www/html/Locuz/Programs/log_in.sh  root  root123");

#echo "$output\n";

?>


When I execute it in command prompt, it gives proper/required output.

Code: Select all

[root@locuzhpc PHP]# php login-test.php

Content-type: text/html

X-Powered-By: PHP/4.3.9

10


But When I run this file in web browser the result is wrong i.e. it is displaying

5

But I want 10 on the browser.


Regards,

Parshuram K.
Post Reply