Jump to content

Recommended Posts

Posted

Well its a small guide ,but you can use this for a shit of things.Its a simple form that inserts data in SQL and then show's it to the admin (example).You can do ALOT of things like i did with it ,its so fucking simple and its used alot.An example is this : click.I used it as a L2 Ticketing system for reporting bugs blabla ,but if you have a good imagination you can use it for news (example).Insert the record to MySQL and then show it to the readers :) So lets see how this thingie works

 

First make a connection to the database.I recommend for all to make a other file called "config.php" or something similiar and there will be all values for connecting etc.So here's how config file should look :

<?php
$user = "root"; // Database user
$pass = "112233"; // Password for the database
$db = "dot"; // Database name
$host = "localhost"; // IP/Host to connect to the database
$connection = mysql_connect($host, $user, $pass) or die("Cant connect to database1"); // Lets try to connect ,if not die();
$db = mysql_select_db($db,$connection)or die("Cant connect to database2"); // If first connection is successful ,lets conncet to the database name ,if error die();
$chars="set character set latin1"; //Charset .. You can use this if you have some problems with the encoding of your character
mysql_query($chars); // To send the encoding of the character type (latin1 type)
?> 

 

That was a simple connection method ,and the most used though.

 

Second step.How to insert to the database?

Well now to establish the connection you can use this code to include the configuration file for sql

<?php include "FILENAME.php"; ?> 

Okay now we have a database connection ,lets proceed to the importing into it.

The import way is easy too ,but pls dont copy/paste it ,so you can learn it faster :)

Here's how the submit form should look .. With explames in the file :)

  <form method="POST">
</p>
<p>Value1: <br />
  <input name="value" type="text" /> 
  *
</p>
  <input type="submit" name="button" value="Submit it!">
  <?php
include('FILENAME.php'); // This is the config file name.Replace it with your config file name in order to connect into database 
if($_POST['button']){ // Here is the button "Submit".It has a name "button" you can change it ,but it its the same.Leave it as it is
$value=$_POST['value']; // This is the first value that we will insert.. If you wish to add more ,look above.
//$ot=$_POST['value1'];
//$izp=$_POST['value2];
//$pesen=$_POST['value3'];
//$screen=$_POST['value4'];
//$comment=$_POST['value5'];
$query = mysql_query("INSERT INTO `table` (value) VALUES('$value')") or die(mysql_error()); // We insert the value we want.For an example i inserted the "VALUE" name ,so its named as $value.
echo "Added successfuly.<br><a href=\"index.php\">Go to the index page..</a>";}?> // Successfuly added ,return to index ^^

 

Okay lets give explanations now.

  <input name="value" type="text" />

This is the value submitted.You can configurate this ,but you also gotta change the sql insert :

INSERT INTO `table` (value) VALUES('$value')")

which is configurated by

$value=$_POST['value'];

If you need more than 1 value ,you can remove the // before the $value1 value and it will be enabled.But you gotta insert it in the INSERT INTO syntax too and has to look something like this :

$query = mysql_query("INSERT INTO `table` (value,value1) VALUES('$value', '$value1')") or die(mysql_error());

 

Okay i think you got it.

Now how to view our already posted records in database?

Well if its successful ,you can make a file called view.php (example ,you can name it w/e u want)

Into this file lets export the records in this way .. Example of the file :

<?php include "conf.php"; // Change it to your config file name 
?>
<?php $q = mysql_query("SELECT * from TABLE order by id DESC"); // Getting the query
while($d = mysql_fetch_assoc($q)) {
		 echo 'Value is : '.$d['value'].''; } ?>

Lets see what we need to change

First the config file name (where are the database info's)

Then change the table which the file will connect

mysql_query("SELECT * from TABLE order by id DESC");

P.S. If you got a ORDER BY id error ,remove the "order by id" text :)

Okay ,everything we got ready from php side ,lets view the sql code now :

CREATE TABLE `TABLE NAME` (
`value` varchar(999) collate latin1_swedish_ci NOT NULL default '',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=376 ; 

On the TABLE NAME write your table name that this code will create.

Execute it with navicat or w/e you are using ,and you're done :)

 

Extra scripts :

 

How to write the users IP when they submit?

Simple :) If you read that guide (all of it) you already know how to insert a new value.So make 1 ,and another colum in SQL by this code :

ALTER TABLE tablename
ADD columname varchar(250);

and execute in sql after you configurate it by your needs.

So make a new value in the php (with inserting in database) and @ put this in the start of the site :

<?php $ip=$_SERVER['REMOTE_ADDR']; ?>

and then insert the value as $ip in the sql insert syntax.

 

How to record all visitors IP's in a text file :

<?php
$file = fopen('ipadmin.txt', 'a'); // opens ,create a new file with storage
fwrite($file,$_SERVER['REMOTE_ADDR']."\n"); // Ip storing
fclose($file); // Close the file
echo "<br><b>Your ip was stored successfuly in ipadmin.txt file.</b>"; // if successful
?>

If you dont want your visitors not to understand that they'r ip is recorded ,remove this

echo "<br><b>Your ip was stored successfuly in ipadmin.txt file.</b>"; // if successful

 

Thanks for all who saw it ^^

 

The guide is MINE and its wroten specialy for the programmers in worldb0x ,but i shared it here too :)

Thanks for reading!

Posted

Nice Guide its like how to start programming with databases and php's basic functions :).

Keep it up mate.

Posted

Nice one for the newcomers.

If someone wants to gain more knowledge about this or other useful things, visit www.w3schools.com [server Scripting].

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Posts

    • looking for someone who has cache cleaner for h5 
    • I’m looking to buy GeoEngine compatible with L2Scripts (Essence). A test server must be provided so I can verify functionality before purchase. DM here or through Telegram: @nick77737
    • fixed !.. thank you veru much @NevesOma  someone lock it
    • OFFICIAL DEVELOPERS Undetected since : Release Updated for last patch : 29/11/2025 After payment you will receive: Product download link1 Activation key for the selected period. Free support for the duration of the product subscription.   ✅AC - Undetected ▸WINDOWS 10/11 (All versions, even 24H2) ▸INTEL / AMD ▸Our software mainly targets player wanting to cheat legitimately. . Precision. Stealth. Performance.   The external ARC Raiders cheats from stern designed to elevate your gameplay without slowing your system. Fully compatible with Windows 10/11 — Intel & AMD ready.   Our Functions: AIMBOT **Enable Aim requires a mandatory confirmation popup, so there’s zero risk of activating it by accident for users who don’t want to use it. Aimbot Aimbot Drone Fov Aim (Draw fov circle) Target Line (Draw targetline) Arrow Fov (Draw arrow fov) Visible Check (Aim visible) Humanize (Aim randomize) Custom Aim Key Fov Value / Smooth Value / Aim Delay Arrow Size & Spacing VISUALS – PLAYERS Box ESP (2D / Corner) Health / Shield Bar Skeleton ESP Distance ESP Name ESP Tracers / Player Lines Visible & Invisible Check Squad Name ESP Draw Eyes Directions Radar ESP Radar Distance ESP Players Flags (corpse/knocked/exit/alive) VISUALS – ENTITY Pickup Base ESP Drone ESP Probe Crashed ESP Apricot ESP Mullein ESP Agave ESP MossRock ESP Crate ESP Salvage Container ESP Rsr Lockers ESP Raiders Cache Esp Bin Trash Esp Shredder Esp Fruit Basket ESP Ammo Box ESP Computer ESP Backpack ESP Leaper ESP Probe ESP Mushroom ESP Cargo Ship ESP Firewall ESP Assault Rifle ESP Battle Rifle ESP SMG ESP Grenade ESP Medical Bag ESP Turret ESP Sentinel Esp Weapon Case Esp Extraction ESP All Weapons ESP Max Distance & Fade distance MISC FOV Arrow Player Count Display Custom Arrow Size & Distance Streamproof (Invisible in recordings & screenshots) External (No injection) Maximum Privacy & Security 24/7 Support Available: replies within minutes Our prices: Prices must be checked directly on our website, as they may change at any time to control sales — however, we remain among the most competitive in the market.   Discover our website   GET GOOD, GET STERN
    • I paid this guy yesterday (i got screen for the payment for proof), he told me that someone will log to send me my adena. Then he said he had some problems and couldn't send me the adena. Waited and waited and waited until he replied that he can't find the guy and he will return the money i gave him. Today still no money returned and he doesn't reply to the discord messages. If he doesn't return the money i paid or send the adena he promised in game, i will report him in every single website and many more. Stay away. I have all the discussion screenshot on discord with him. He knows who i am so he better keep his promise legit.
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock