Follow along with the video below to see how to install our site as a web app on your home screen.
Note: this_feature_currently_requires_accessing_site_using_safari
Actually you will...it just takes....a long long time...First, yon won't find any good hosting for free, without banners and things like that.
Sooo right... I love PHP. I made my own login\logout\register scripts..(My first one would only allow 1 user per account, log you out after 15mins of inactivity, only 1 account with a certain email\username(obviously), verify emails), a tagboard(one of my first), this was also with mysql. heh PHP rules....Second, I really, really suggest you to learn php, it's a very powerfull langage, it's free (you can start a test server on your machine and do stuff with php and a MySQL database). PHP will allow you to change the content of your Web site dynamically. Say you want to add screenshots of your MOD into your Web page, you would have an interface that would let you select an image on your hard drive and then you would click on a button and it would upload that image, and display it correctly into the screenshot section of your Web site. That's a very basic example, but the possibilities are endless.
What about your PHP files?and host your HTM(L) files on freewebs.com, there's no popups, banners or whatever there.
// First you will need to connect to the database then you can do the following query
$query = "SELECT * FROM Member"; // The * means it will choose all the fields
$result = mysql_query($query);
while($row = mysql_fetch_object($result)){
echo 'First name : '.$row->FirstName.'[br]';
echo 'Last name : '.$row->LastName.'[br]';
echo 'Join date : '.$row->JoinDate.'[br]';
echo 'City : '.$row->City.'[br]';
echo '[br]';
}
Listen to him.Ti133700N said:If I understand correctly, you want to make something like .txt files that would contain the informations of the members...? This method is very uncommon, it is feasable to a certain extend but not very effective and very very slow.
Trust me the best method is to use a MySQL database. Plus it will be very easy for you to find tutorials and examples on the net on how to do it that way.
yes they do have php and sql support but i dont know how to set up my databases and such. usually they are supposed to have a cpanel or something and a visual interface for you to create things but mine doesnt. so i'm lost.Limpet said:If you're using another server to host your stuff they'll usually have those services set up for you. So then all you'll need to do is upload the php files. Not quite sure about mySQL though.
<FORM name="Form" id="Form" action="valid_inscription.php" method="post">
<input TYPE="text" name="Email" id="Email" SIZE="20" MAXLENGTH="50">
<INPUT type="hidden" name="postcheck" value="1">
<INPUT type="submit" value="Send">
</FORM>
<?php
$Good = 0;
if(isset($_POST["postcheck"])){
$Email = trim($_POST["Email"]);
if($Email != ''){
$query = "INSERT INTO Members (Email) VALUES ('".$Email."')";
$mysql_query($query) or die(mysql_error().' - '.$query);
$Good = 1;
}
}
if($Good == 1){
echo 'Thank you';
}else{
echo 'You suck';
}
?>
now this is working fine(no connecting errors or posting erros), but when it writes down the info into the database its on two different rows. i know i could probably just add a comma here:<?php
mysql_connect("farvista.net", "my username", "my password") or die(mysql_error());
echo "Connected to MySQL[br]";
mysql_select_db("my database") or die(mysql_error());
echo "Connected to Database[br]";
$Good = 0;
if(isset($_POST["postcheck"]))
{
$Email = trim($_POST["Email"]);
if($Email != '')
{
$query = "INSERT INTO Members (Email) VALUES ('".$Email."')";
mysql_query($query) or die(mysql_error().' - '.$query);
$Good = $Good+1;
}
$Good=$Good;
$Username = trim($_POST["Username"]);
if($Username != '')
{
$query = "INSERT INTO Members (Username) VALUES ('".$Username."')";
mysql_query($query) or die(mysql_error().' - '.$query);
$Good = $Good+1;
}
}
$Good=$Good;
if($Good == 2)
{
echo 'Thank you';
}
else
{
echo 'You suck';
}
?>
but then...i don't know how to make sure they write down in both fields. like what if they left one empty and it records it empty? how do i put up things that make sure it checks that you put something down while writing it all down on the same row? need help :|$query = "INSERT INTO Members (Email, Username) VALUES ('".$Email."', '".$Username."')";
mysql_query($query) or die(mysql_error().' - '.$query);
$Good = $Good+1;
<?
session_start();
include "config.php";
// THIS IS THE CONTENT OF config.php //
<?php
//Connection to the database
$dbh=mysql_connect ("localhost", "user", "pass") or die ('Cannot connect to the database: ' . mysql_error());
$ptr_baseDonneesMySQL=mysql_select_db ("nameofthedb");
?>
///////////////////////////////////////
$Checked = 'checked';
?>
<script language="javascript">
function Validate(){
var Good = 1; // Assume everything is ok
var re = /^[a-zA-Z0-9]*$/; // Alphanumerical characters
var User = document.getElementById('user').value;
var Pass = document.getElementById('pass').value;
var Passconfirm = document.getElementById('passconfirm').value;
var Email = document.getElementById('email').value;
// Trim all the fields (removes spaces before)
User = User.replace(/^\s*|\s*$/g,"");
Pass = Pass.replace(/^\s*|\s*$/g,"");
Passconfirm = Passconfirm.replace(/^\s*|\s*$/g,"");
Email = Email.replace(/^\s*|\s*$/g,"");
if(User == ''){
Good = 0;
alert('The username cannot be blank.');
document.getElementById('user').focus();
}else if(!re.test(User)){
Good = 0;
alert('The username must contains alphanumerical characters only.');
document.getElementById('user').focus();
}else if(Pass == ''){
Good = 0;
alert('The password cannot be blank.');
document.getElementById('pass').focus();
}else if(!re.test(Pass)){
Good = 0;
alert('The password must contains alphanumerical characters only.');
document.getElementById('pass').focus();
}else if(Pass != Passconfirm){
Good = 0;
alert('The password and the confirmation doesn\'t match.');
document.getElementById('passconfirm').value = "";
document.getElementById('passconfirm').focus();
}else if(Email == ''){
Good = 0;
alert('The email cannot be blank.');
document.getElementById('email').focus();
}else if(Email.indexOf(".") <= 0){
Good = 0;
alert('The email is not valid.');
document.getElementById('email').focus();
}else if(Email.indexOf("@") <= 0){
Good = 0;
alert('The email is not valid.');
document.getElementById('email').focus();
}
if(Good == 1){
document.getElementById('Form').submit();
}
}
</script>
<?php if(isset($_POST["PostCheck"])){ ?>
<?php
if($_POST["Maillist"] != 1){
$Checked = '';
}
?>
<?php }else{ ?>
<form name="Form" id="Form" action="<?php echo $HTTP_SERVER_VARS['PHP_SELF']; ?>" method="post">
<input name="PostCheck" id="PostCheck" type="hidden" value="1">
<table align="left" cellspacing="0" cellpadding="3" >
<tr><td align="right">Username :</td><td><input type="text" name="user" id="user" maxlength="20" size="25" value="<?php echo $_POST['user']; ?>"></td></tr>
<tr><td align="right">Password :</td><td><input type="password" name="pass" id="pass" maxlength="20" size="25" value="<?php echo $_POST['pass']; ?>"></td></tr>
<tr><td align="right">Confirm password :</td><td><input type="password" name="passconfirm" id="passconfirm" maxlength="20" size="25" value="<?php echo $_POST['passconfirm']; ?>"></td></tr>
<tr><td align="right">Email :</td><td><input type="text" name="email" id="email" maxlength="200" size="35" value="<?php echo $_POST['email']; ?>"></td></tr>
<tr><td align="right"></td><td></td></tr>
<tr><td colspan="2">Subscribe to the mailing list <input type="checkbox" name="Maillist" id="Maillist" value="1" <?php echo $Checked; ?>></td></tr>
<tr><td align="right"></td><td></td></tr>
<tr><td colspan="2" align="center"><input type="button" name="Register" id="Register" value="Register" onClick="Validate();"></td></tr>
</table>
</form>
<?php } ?>