FaLgoR
Members-
Content Count
224 -
Joined
-
Last visited
Everything posted by FaLgoR
-
let's make insert.php (or something else):<?if($go){ // if var $go is setmysql_query("INSERT INTO table(name,description,image,location) VALUES ('$name','$desc','$image','$location') or die (mysql_error());print "Done!";exit;} else { // not really required at this case but...?><form action="insert.php" method="post">Name: <input type="text" name="name"><br>Description: <input type="text" name="desc"><br>Image: <input type="text" name="image"><br>Location: <input type="text" name="location"><br><input type="submit" name="go" value="Submit"></form><?}?>But don't forget to connect this page with the database. I suggest that you make a new page called conection.php with all the details and connections, and put: include("conection.php"); at the top of the pages which requires an connection.
-
Are you sure you have conected to the database on download.php?
-
Age Of Empires 3 Age Of Empires 3 from Microsoft
FaLgoR replied to Goosestaf's topic in Computer Gaming
Everybody go on and visit http://forums.xisto.com/no_longer_exists/ gogogogo!!! Age of Empires III seems to be great, and I see it will be just like The Sims... auhaieaheauh but unhappilly my sux computer will never run the game my computer only runs with coal... uaHUIEAHuie LoL -
I want to learn one more programing language, and I have some questions about delhpi:how can I test my codes writen in delphi? where can I find some editors or tutorials? where can I find some good opensource program writen in delphi (I want to study the source code) ? Thank you!
-
yes, its really very expensive. And I think PHP is very better than cold fusion. Its cheap, easy and fast.
-
validate the forms? I did not understand, but I use PHP:for <input name="name">:if(!$name){print "You can't let the input "name" in blank.";exit;}for long forms:if(!$name || !$email || !$age){print "You can't let any input in blank.";exit;}
-
OK, put this code on your page:<?$query = mysql_query("SELECT * FROM table ORDER BY id DESC");?><table border="1" cellpadding="0" cellspacing="0"><?while($var = mysql_fetch_array($query)){?> <tr><td align="center" valign="top"><img src="<?=$var[image]?>"></td><td width="397" align="left" valign="top"><font size="2" face="Arial"><strong><?=$var[name]?></strong><br><?=$var[description]?><br><a href="download.php?id=<?=$var[id]?>">DOWNLOAD</a></font></td></tr><?}?></table>And now, lets do download.php:<?if(!$id)return;$query = mysql_query("SELECT * FROM table WHERE id=$id;");$download = mysql_fetch_array($query);if(!file_exists($download[location])){print "Download file not found.";exit;}mysql_query("UPDATE table SET clicks=(clicks+1) WHERE id=$id;");header("Location: $download[location]");?>Don't forget to connect with database and add the column "id" to your database (with auto_increment). If it doesn't work, please post again and i'll look for the problem.
-
I don't know about the scripts installed here, but im just tring to help who wants to make their own. If everybody only uses scripts already installed they will got some dependance of them.
-
Yes, this topic is only an example of how to do an contact form, I did not put any other advanced things. Thank you for your help!
-
In first place, make an html page with the form.<html><head><title>My first form with PHP</title></head><body><form action="sendmail.php" method="post"><table border="0"><tr><td>Name:</td><td><input type="text" name="name"></td></tr><tr><td>E-Mail:</td><td><input type="text" name="email"></td></tr><tr><td>Subject:</td><td><input type="text" name="subject"></td></tr><tr><td>Mesage:</td><td><textarea name="mesage"></textarea></td></tr><tr><td><input type="submit" value="Send Mesage"></td><td><input type="reset" value="Reset Form"></td></tr></table></form></body></html>OK, now, lets make sendmail.php:<?$myemail = 'yourmail@blah.com'; // Put here your e-mail addressmail($myemail,$subject,$mesage,$email) // To, Subject, Mesage and Fromecho 'Thank you for your e-mail!';?>Simple, huh?Any questions just post here.
-
Well, this topic is for you that wants to have a rotate banner in your site. First, create a new table on mysql: CREATE TABLE `banners` ( `id` BIGINT( 255 ) NOT NULL AUTO_INCREMENT , `imageurl` VARCHAR( 255 ) NOT NULL , `alt` VARCHAR( 255 ) NOT NULL , `url` VARCHAR( 255 ) NOT NULL , `clicks` BIGINT( 255 ) NOT NULL , PRIMARY KEY ( `id` ) ); well, now lets insert a new banner on this table: INSERT INTO `banners` ( `id` , `imageurl` , `alt` , `url` , `clicks` ) VALUES ( '', 'http://forums.xisto.com/no_longer_exists/' 'Xisto - The best free web hosting on the web', 'http://forums.xisto.com/' '' ); Now, the page which will show the banners: <? mysql_connect("localhost","user","pass"); mysql_select_db("dbname"); $randbanner = mysql_query("SELECT * FROM banners ORDER BY RAND() LIMIT 1"); $i = 1; while($banner = mysql_fetch_array($randbanner)){ $id = $banner["id"]; $imageurl = $banner["imageurl"]; $alt = $banner["alt"]; $url = $banner["url"]; $clicks = $banner["clicks"]; $banners[$i]"http://forums.xisto.com/= "$imageurl"; $banners[$i]http://forums.xisto.com/= "click.php?id=$id"; $banners[$i][alt] = "$alt"; $r = rand($i,sizeof($banners)); // rotate echo '<a href="'.$banners[$r]." target="_blank"><img src="'.$banners[$r]"" alt="'.$banners[$r][alt].'" border="0"></a>'; // Show the banner } ?> Now, lets make clicks.php: <? mysql_connect("localhost","user","pass"); mysql_select_db("dbname"); $id = addslashes($_GET['id']); // addslashes is for security of your database $clicks = mysql_query("UPDATE banners SET clicks=clicks+1 WHERE id='$id'"); $table = mysql_query("SELECT * FROM banners WHERE id='$id'"); $details=mysql_fetch_array($table); $url = $details["url"]; $id = $details["id"]; echo '<meta http-equiv="refresh" content="1;url='.$url.'">'; // After 1 second, redirect for the URL of the banner ?> That's all, if you have any questions just post here!
-
Yes I want only to start a topic with free web hostings, but I belive that there is no free web hosting beter than Xisto
-
Connecting to database:$dbhost = 'localhost';$dbuser = 'user';$dbpass = 'password';$dbname = 'name';mysql_connect($dbhost,$dbuser,$dbpass);mysql_select_db($dbname);You will have to add the fields name, image, description... just like we have used above.Note: I have user vars to define the database info, but its not needed.If you have any other question, post again and I'll try to help you
-
People Against The War And The Soliders I HATE THEM
FaLgoR replied to --Stealth--'s topic in The Vent
I am against the war and disagree what Bush is doing, but I can't be against the soldiers. They are dy'n for their country, their people. We can be against who starts a war, and not who makes the war. Do you think the soldiers are fighting because they want it? I think not. -
Post here all PHP free web hostings you know. I will start: http://www.uklinux.net/ MYSQL - 20MB http://www.fusioncities.com/ MYSQL - 30MB http://forums.xisto.com/no_longer_exists/ MYSQL - 100MB http://forums.xisto.com/no_longer_exists/ MYSQL - 999MB http://web.intrascape.com/ MYSQL - 15MB http://www.lycos.co.uk/ MYSQL - ?MB http://www.coolfreepages.com/rg-erdr.php?_rpo=t
-
You don't need any books, you have all u need on the web I learn PHP with 12 years old at this way o.O and if you have any question, just post here and we will try to help you =D
-
<?$query = mysql_query("SELECT * FROM table ORDER BY id DESC");?><table border="1" cellpadding="0" cellspacing="0"><?while($var = mysql_fetch_array($query)){?> <tr> <td align="center" valign="top"><img src="<?=$var[image]?>"> </td> <td width="397" align="left" valign="top"><font size="2" face="Arial"><strong><?=$var[name]?></strong><br><?=$var[description]?><br><a href="<?=$var[location]?>">DOWNLOAD</a></font> </td> </tr><?}?></table>Try to do it, if its not in the order u want, try to change "DESC" for "ASC".
-
If global vars are turned on, use $REMOTE_ADDR, else, use $_SERVER["REMOTE_ADDR"].
-
What languages are allowed in my website?
-
Have You Played The Sims 2? Rate your experience with The Sims 2
FaLgoR replied to iGuest's topic in Computer Gaming
I've never played The Sims 2, but I've played TS1 and I think it really sucks. Make friends, got a job, clean the home? I don't need a game to do it, I have my life! I have never played TS2 and I cant say anything about it, but if it is like TS1.... Sorry if you feel offended, but I am just posting my opinion -
Are Online Games Better Then Offline Games? ansewr piz
FaLgoR replied to frozensolid's topic in Computer Gaming
Online games are much better than offline games. Online games are hardest, you are playing with humans just like you. And its good to make friends too =P talking with your allied, your enemys, each player with their tatics...... Online games are much better. :rolleyes:AI will never be better than human Inteligence ("HI" LoL) -
I want to learn new prog languages, and I chose C. But there are many problems, I don't know where to begin . Can you tell me some compilers (free if its possible), editors, tutorials, websites talking about it, hints, opensource programs, or any other thing? Please help a begginer Thanks
-
My fav is Final Fantasy X because it's the only FF game I've played in PS2 too. The other Final Fantasy I've played are Final Fantasy VII and VIII. I liked Final Fantasy VII too, but Final Fantasy VIII sucks. The chars, the history, the fu***** card games... :/
-
Hey can somebody tell me some IRC channels (with the network) about age of empires? RM channels, clans, scenarios, etc.Thank u