Cool thank you i will read the code when i get time and learn some thing from it.
Cool thank you i will read the code when i get time and learn some thing from it.
Sorry to 2 posted but could not edit my other post :S
Dentafrice dose not work i have a look at the code typed to fix it but i am stumped.
This is an addon to what Dentafrice posted. It's so you can make licences/serials.
I am a newbie at PHP, it's only quick, and I've not been learning long. I've made the SQL too.
Save that as add.phpPHP Code:<?php
include "config.php";
if ($_POST[enter]) {
$serial1 = $_POST[serial1];
$serial2 = $_POST[serial2];
$serial3 = $_POST[serial3];
$serial4 = $_POST[serial4];
$query = mysql_query("INSERT INTO serial (serial1, serial2, serial3, serial4) VALUES('$serial1','$serial2','$serial3','$serial4')");
echo "Serial has been made. The serial is ".$serial1."-".$serial2."-".$serial3."-".$serial4."";
}
else
{
echo ("<form method=\"POST\">
Serial1: <input type=\"text\" size=\"4\" maxlength=\"4\" name=\"serial1\"><br />
Serial2: <input type=\"text\" size=\"4\" maxlength=\"4\" name=\"serial2\"><br />
Serial3: <input type=\"text\" size=\"4\" maxlength=\"4\" name=\"serial3\"><br />
Serial4: <input type=\"text\" size=\"4\" maxlength=\"4\" name=\"serial4\"><br />
<input name=\"enter\" type=\"submit\" value=\"Submit\">
</form>");
}
?>
the SQL is
If it doesn't work I'll try and fix. IT HAS NO SECURITY. So a good idea would be to delete the file from your site when you've added a licence, then re upload to a hidden location when you want to add another. But, it can only hold 4 characters in each, not enough for SQL injection?PHP Code:CREATE TABLE `serial` (
`id` int(11) NOT NULL auto_increment,
`serial1` varchar(4) NOT NULL default '',
`serial2` varchar(4) NOT NULL default '',
`serial3` varchar(4) NOT NULL default '',
`serial4` varchar(4) NOT NULL default '',
PRIMARY KEY (`id)
) TYPE=MyISAM;
I'll try making something so you can edit the licence/serial.
I've been learning for like 3 days, looking at tuts etc, and I can remember a lot, but usually get errors.
Xotuako
Last edited by Xotuako; 13-05-2007 at 07:53 AM.
I wont be on so much this week - but I'll be on. :8
Lol, thanks. It works I think, I don't have SQL on my bad host (good ones upgrading), but form works etc. Just can't find sql.
This is a good way to remember my name. In Spain, for short text they use an X as ch. So you'd pronounce my name Cho-too-ah-kohOr Cho-too-ah-ko
I wont be on so much this week - but I'll be on. :8
It was just something simple, why make serials in its own table, each license has a field for a key:
`key` text NOT NULL,
AKA serial.
Hmm, I suppose so. Good idea.I might work on it, and edit things to make it better, I dunno.
If I do will you help me when I get stuck? You're a much better coder than me, so you'd know what to do![]()
I wont be on so much this week - but I'll be on. :8
Sure
add me on msn
hxfname at live . com
Want to hide these adverts? Register an account for free!