Results 1 to 10 of 15
-
16th Jul 2010, 08:13 AM #1OPMember
Update Client Record and Insert New Records
Hello,
I have this issue and would like some help on it.
1. I want to design a system whereby a person can register and the details get logged into MYSQL. ( I have done this )
2. The person can login and go to the members area, the username and password should be correct from the mysql ( Done this )
3. I want a administrator panel whereby i can have a form or any info, where i can pick the user from a dropdown list, and then add the following info to their records.
- Phone Number Called
- Minutes called
- Extension Called
Now there will be extensions like 0845, 0800 and others.
I want 0800 to be free and 0845 to be $1/minute so when i add the number of minutes called and the extension there should be a field in the mysql that gets updated with the calculation.
Then after all the input is done the mysql should be updated with the necessary records.
Also then when the user logs into his members panel he should see who he called within the last 10,20,30 days and how much is his charge.
I have only one database table for now which is setup as follows and is for the registration details.
Please assist.
Please reply if you have any questions or anything
Thanks & RegardsSponge Bob Reviewed by Sponge Bob on . Update Client Record and Insert New Records Hello, I have this issue and would like some help on it. 1. I want to design a system whereby a person can register and the details get logged into MYSQL. ( I have done this ) 2. The person can login and go to the members area, the username and password should be correct from the mysql ( Done this ) 3. I want a administrator panel whereby i can have a form or any info, where i can pick the user from a dropdown list, and then add the following info to their records. - Phone Rating: 5
-
16th Jul 2010, 08:25 AM #2Respected Developer
I'll leave this for litewarez.
-
16th Jul 2010, 10:55 AM #3MemberWebsite's:
ExpresShare.comhmmmm...
sorry litewarez!!! u didn't show up yet.
anyway I may help out with some PHP code
PHP Code:include (DB.php); //DB config and function.
connect_DB(); //connect to the DB
$querry_select="select username FROM userstable";
$result_select=fetch_results($querry_select);// pulling results out of DB and processing it.
echo "<select>";
foreach($result_select AS $user )
{
echo "<option>$user</option>";
}
echo "</select>";
//users are pulled and displayed into a dropdown list.
/*
here put the HTML code of the calls proprieties ( Phone Number Called,Minutes called, Extension Called).
*/
PHP Code:
$username=$_POST['username']; //the drop down menu that contain the username.
$phone=$_POST['phone_number']; //Phone Number Called
$minutes=$_POST['minutes']; //Minutes called
$ext=$_POST['extension']; //Extension Called
$cost=0;
if ($ext == 0845) then
{
$cost=$minutes;
}
$querry_insert="insert into Calls values (null,'$username','$phone','$minutes','$ext','$cost')";
//the ID of the call is a primary key and it's auto incremented thus the null in the beginning .
result_insert=mysql_querry( $querry_insert);
echo $result;
}
-
16th Jul 2010, 11:13 AM #4OPMember
hmmmm thanks for that code.
I will try that code and get back to you.
-
16th Jul 2010, 11:49 AM #5OPMember
Well as you can see here
www.callsforu.com is the name i have registered for this project.
I have for the login system and all done.
Now i need to have another page for the admin who can be able to post the various details to a clients database.
Do i need another database opened for this, and if yes what fields can i put on that database?
Please assist.
-
16th Jul 2010, 04:36 PM #6MemberWebsite's:
litewarez.net litewarez.com triniwarez.comok so make sure you always setup abstract tables
what i mean by abstract is keep certain entities separate but linked.
For example you obv are doing some cost per call system and each member has a number dedicated to them
Create a new table called phone_types and you can populate like so
Code:|------------------------------------------| | ptype_id ptype_code ptype_costpermin| -------------------------------------------| | 1 0800 1.00 | | 2 0845 0.00 | -------------------------------------------|
you can then add a column in your users table and depending on the type of call you putt an id in the ptype column for users..
this way each user will have the id number to a row in the other table
then what you can do is use JOINS to get the type of call with the user
Code:SELECT *.user FROM users LEFT JOIN ptypes ON (users.ptype_id = ptypes.ptype_id) WHERE user_id = 2;
Does that help ?
---
And derm.... wtf is
PHP Code:if $_post["extension"] == 0845 then
PHP Code:$querry_insert="insert into Calls values (null,'$username','$phone','$minutes','$ext','$cost')";
result_insert=fetch_results( $querry_insert);
Join Litewarez.net today and become apart of the community.
Unique | Clean | Advanced (All with you in mind)
Downloads | Webmasters
Notifications,Forum,Chat,Community all at Litewarez Webmasters
-
16th Jul 2010, 09:31 PM #7MemberWebsite's:
ExpresShare.comOriginally Posted by litewarez
didn't think about the "types of calls" table,this will avoid a lot of redundancy.
-
16th Jul 2010, 10:02 PM #8MemberWebsite's:
litewarez.net litewarez.com triniwarez.comAlso query is on spelt with 2 r's
Join Litewarez.net today and become apart of the community.
Unique | Clean | Advanced (All with you in mind)
Downloads | Webmasters
Notifications,Forum,Chat,Community all at Litewarez Webmasters
-
16th Jul 2010, 10:09 PM #9Member
I would also like 2 add and suggest not to use JP's login script as its 5+ years old and can be exploited fairly easy.
Please follow signature rules
-
17th Jul 2010, 01:43 AM #10Respected DeveloperWebsite's:
wrzc.orgI don't know how much you've done or coded of the general login area but I wouldn't use dermechove example above as it enters the data directly into the DB without checking for malicious script leaving you prone to exploits.
Personally I don't bother creating a login script every time from scratch every time I'm starting a new project as it's unnecessary and time consuming. I start with a base and modify it to my needs. For a great and easy to modify base I'd suggest http://php-login-script.com/ It has an admin area, validation, protection, simple admin area etc etc. all you need and will save you time. For a simple script and site like this it's ideal.
Then use litewarez idea of a separate table for the caller part and you'll be sorted. I wouldn't have it in the same table as the user details.Tutorial How to SEO your Warez Site a guide to help you increase your organic traffic
Huge list of Warez Sites and free Multiposter Templates
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
Understanding MX Records - I need help
By water-works in forum Webmaster DiscussionReplies: 2Last Post: 21st Aug 2012, 07:23 PM -
Understanding MX records
By Albert.Nawaro in forum Tutorials and GuidesReplies: 0Last Post: 9th Feb 2012, 11:26 AM -
Dupe sql records
By Chris2k in forum Web Development AreaReplies: 7Last Post: 25th Dec 2011, 04:37 AM -
Please help me changing MX Records
By Jason_weds_Freddy in forum Technical Help Desk SupportReplies: 6Last Post: 1st Apr 2011, 08:09 PM -
A records
By GoPantheoN in forum Technical Help Desk SupportReplies: 2Last Post: 13th Aug 2010, 01:58 PM
themaCreator - create posts from...
Version 3.47 released. Open older version (or...