Hello and welcome to the Webmasters Forums!. This is the best place to get webmasters resources for free. Get $2 for free today, read more - Make your payment today. Download premium and professional templates for free. Get free web hosting without ads, read more. You can get lot more by simply join with this forum. To gain full access to the forums you must sign up for a free account.


Post Reply  Post Thread 

php help

Post Bank
Posting Manager
******

Posts: 995
Group: Forum Team
Joined: Sep 2006
Status: Online
Make money from now. You can make money just for posting on this forum. Every discussions on this community gives you more money. $2 minimum payout. So get your payment today, SignIn with this forum.

Signin to Remove this Post

scorpion
Member
**


Posts: 144
Group: Registered
Joined: Oct 2007
Status: Offline
Reputation: 0
Points: 119 (Donate)
Post: #1

php help


hello i want to create a online registration fom for my college fest. I installed phpFormGenerator from Fantastico installer. the link is
http://www.sjicpuc.com/form/use/spark/form1.html
everything is done, but when i click on submit there's an internal error... plz can ny1 help me regarding this problem or suggest a good place where i can make a form and plus i need a special code...tht is when some1 registars the person shuld get a unique code like SP072001 to SP073000


PLZ HELP and its urgent.


http://www.technobitez.com/
http://www.joelifernandes.com/
http://www.everythingvista.net/
02-11-2007 05:03 PM
Visit this user's website Find all posts by this user Quote this message in a reply
ivenms
Administrator
*******


Posts: 2,179
Group: Administrators
Joined: Sep 2006
Status: Offline
Reputation: 14
Points: 4389 (Donate)
Post: #2

RE: php help


What you actually wants to do with your form?

May be if you explain that, I can do some coding for you..


Read: General Rules & Policies before posting.
Make Money By Posting | Earning and Exchanging Points | Add Your Links
03-11-2007 03:31 AM
Find all posts by this user Quote this message in a reply
scorpion
Member
**


Posts: 144
Group: Registered
Joined: Oct 2007
Status: Offline
Reputation: 0
Points: 119 (Donate)
Post: #3

RE: php help


see we are hosting a fest in our college and the name is SPARK. It is a national fest. Since colleges are coming from outside we want an online registration form where people can come and register online and get a special e-ticket...thtat is a special and unique code. sp plz help me generating a code....


http://www.technobitez.com/
http://www.joelifernandes.com/
http://www.everythingvista.net/
03-11-2007 02:20 PM
Visit this user's website Find all posts by this user Quote this message in a reply
scorpion
Member
**


Posts: 144
Group: Registered
Joined: Oct 2007
Status: Offline
Reputation: 0
Points: 119 (Donate)
Post: #4

RE: php help


plz some one help fast....i need this by monday....plz...


http://www.technobitez.com/
http://www.joelifernandes.com/
http://www.everythingvista.net/
04-11-2007 01:17 AM
Visit this user's website Find all posts by this user Quote this message in a reply
ivenms
Administrator
*******


Posts: 2,179
Group: Administrators
Joined: Sep 2006
Status: Offline
Reputation: 14
Points: 4389 (Donate)
Post: #5

RE: php help


Sorry for the delay..

You mean a ticket which generates a special code??

How you like to store the data? In database?

Not getting any idea about your use. If you need simple script, I can help you..


Read: General Rules & Policies before posting.
Make Money By Posting | Earning and Exchanging Points | Add Your Links
05-11-2007 04:15 PM
Find all posts by this user Quote this message in a reply
scorpion
Member
**


Posts: 144
Group: Registered
Joined: Oct 2007
Status: Offline
Reputation: 0
Points: 119 (Donate)
Post: #6

RE: php help


ya...in the database...or the simple script...any thing...which one can you do?


http://www.technobitez.com/
http://www.joelifernandes.com/
http://www.everythingvista.net/
05-11-2007 07:19 PM
Visit this user's website Find all posts by this user Quote this message in a reply
ivenms
Administrator
*******


Posts: 2,179
Group: Administrators
Joined: Sep 2006
Status: Offline
Reputation: 14
Points: 4389 (Donate)
Post: #7

Cool PHP Program that Helps to Register, Make Random Ticket and Put all values to Database


scorpion Wrote:
ya...in the database...or the simple script...any thing...which one can you do?


Hope that you have a good scripting skill. if so, I just want to guide you.... Smile

Things to do...

Registration form:

Code:
<form method="post" action="register.hp">
<input type="text" name="field_name" value="default" />
.....
.....
.....
<input tyle="submit" value="Register" />
</form>


Register.php File:

PHP Code:
<?php

// Connect the script with your database first on here.

//Then retrieve every variables from the HTML form like the next line code.
$variable_name$_POST['field_name'];


// After getting all data from the HTML registration form, Create the ticket.
// Here am making a simple code which generates a sequence of characters randomly for each registered members.

$ticket md5(rand(0999));

//Then display the ticket to the registrar:
echo "<b>$ticket</b>";

//Then put all the data into the database table for further future use...
//Use SQL queries to use that... 


Thats all to make a simple registration form...

Hope that this helps you to built your own registration form for your site... Smile


Read: General Rules & Policies before posting.
Make Money By Posting | Earning and Exchanging Points | Add Your Links
05-11-2007 09:14 PM
Find all posts by this user Quote this message in a reply
scorpion
Member
**


Posts: 144
Group: Registered
Joined: Oct 2007
Status: Offline
Reputation: 0
Points: 119 (Donate)
Post: #8

RE: php help


ivenms Wrote:

scorpion Wrote:
ya...in the database...or the simple script...any thing...which one can you do?


Hope that you have a good scripting skill. if so, I just want to guide you.... Smile

Things to do...

Registration form:

Code:
<form method="post" action="register.hp">
<input type="text" name="field_name" value="default" />
.....
.....
.....
<input tyle="submit" value="Register" />
</form>


Register.php File:

PHP Code:
<?php

// Connect the script with your database first on here.

//Then retrieve every variables from the HTML form like the next line code.
$variable_name$_POST['field_name'];


// After getting all data from the HTML registration form, Create the ticket.
// Here am making a simple code which generates a sequence of characters randomly for each registered members.

$ticket md5(rand(0999));

//Then display the ticket to the registrar:
echo "<b>$ticket</b>";

//Then put all the data into the database table for further future use...
//Use SQL queries to use that... 


Thats all to make a simple registration form...

Hope that this helps you to built your own registration form for your site... Smile



i am really very poor in scripting....so plz can you tell me how to proceed with this code....Sad:(


http://www.technobitez.com/
http://www.joelifernandes.com/
http://www.everythingvista.net/
06-11-2007 01:42 PM
Visit this user's website Find all posts by this user Quote this message in a reply
ivenms
Administrator
*******


Posts: 2,179
Group: Administrators
Joined: Sep 2006
Status: Offline
Reputation: 14
Points: 4389 (Donate)
Post: #9

RE: php help


scorpion Wrote:
i am really very poor in scripting....so plz can you tell me how to proceed with this code....Sad:(


Ohh...

I don't know about your application and so I can't give you the complete code that suits for you. This code helps you to make a HTML form for registration, then retrieve those values on a php file, create a ticket for the registered member, then put those values in a database.

Atleast you need to try with this code. Otherwise, you can't develop your code successfully.k


Read: General Rules & Policies before posting.
Make Money By Posting | Earning and Exchanging Points | Add Your Links
06-11-2007 04:13 PM
Find all posts by this user Quote this message in a reply
scorpion
Member
**


Posts: 144
Group: Registered
Joined: Oct 2007
Status: Offline
Reputation: 0
Points: 119 (Donate)
Post: #10

RE: php help


how can i do that using my cpanel....and there is a script in fantastico called as phpForm generator...what about that?....


http://www.technobitez.com/
http://www.joelifernandes.com/
http://www.everythingvista.net/
07-11-2007 06:22 PM
Visit this user's website Find all posts by this user Quote this message in a reply
ivenms
Administrator
*******


Posts: 2,179
Group: Administrators
Joined: Sep 2006
Status: Offline
Reputation: 14
Points: 4389 (Donate)
Post: #11

PHP Script for a Siple Registration Form that Generates Random Tickets


Am changing the code to use it for your registration form...

Your Fields:

  • College Name.
  • Name of the Registering Person.

HTML Code for Form:

Code:
<form method="post" action="register.hp">
Your Name: <input type="text" name="name" value="" />
Your College: <input type="text" name="col" value="" />
<input type="submit" value="Register" />
</form>



Make a "register.php" file and put in the same directory as the form page.

register.php File:

PHP Code:
<?php

// Database server location
$database_server "localhost";

//The name of the database which is used for storing data.
$database_name "your_database_name";

//Username to connect with the database
$username "username";

//Password for database connection.
$password "password";

//Your Table name to store Data - Table Structure: table(id, name, college, ticket)
$table "table_name";

//------ Don't edit the following part ---------

$link mysql_connect($database_server$username$password);
if (!
$link) {
    die(
'Not connected : ' mysql_error());
}

$db_selected mysql_select_db($database_name$link);
if (!
$db_selected) {
    die (
'Can\'t use '.$database_name.' : ' mysql_error());
}


//Then retrieve every variables from the HTML form like the next line code.

$user_name $_POST['name'];

$college $_POST['col'];

// After getting all data from the HTML registration form, Create the ticket.
// Here am making a simple code which generates a sequence of characters randomly for each registered members.

$ticket md5(rand(0999));

//Then display the ticket to the registrar:
echo "<h1>Your Ticket No: $ticket</h1>";

//Then put all the data into the database table for further future use...

$sql "INSERT INTO $table (name, college, ticket) VALUES ('$user_name', '$college', '$ticket')";

if (
mysql_query($sql)) {
    echo 
"Your Registration is Successfully Executed.";
  }
  else {
    echo 
mysql_error();
    }
mysql_close($link);
?>


To work this registration page perfectly, first you need to setup a database with table...

The Table's structure is: id, name, college, ticket. The id is primary key for the table and make it as auto incremental. You can do all this stuffs with the help of PhpMyAdmin.

So here is my $10 worth code for your registration page.


Read: General Rules & Policies before posting.
Make Money By Posting | Earning and Exchanging Points | Add Your Links
07-11-2007 10:07 PM
Find all posts by this user Quote this message in a reply
scorpion
Member
**


Posts: 144
Group: Registered
Joined: Oct 2007
Status: Offline
Reputation: 0
Points: 119 (Donate)
Post: #12

RE: php help


hey ivenms thank you very much for the script....plz check your PM..


http://www.technobitez.com/
http://www.joelifernandes.com/
http://www.everythingvista.net/
09-11-2007 05:50 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply  Post Thread 

View a Printable Version
Send this Thread to a Friend
Subscribe to this Thread | Add Thread to Favorites
Rate This Thread:

Forum Jump:

Sign In to Remove Ads

Download 1000's of web templates. Unlimited access!
World's Best Web Hosting
Website of the Month

Create-a-Page for Free
SOTM June 2008


Accepting Submissions
for July 2008
Resources

Recommended Sites:



Visit our Sponsors!

Current time: 13-10-2008, 10:03 PM


Copyright © 2002-2008 MyBB Group
Powered By MyBB