![]() |
Home Community Mys-Script Creative Off-Topic |
|
|
Thread Tools | Display Modes |
#3
|
||||
|
||||
![]()
It's possible, "Giving money" is just an update to the database. It requires some understanding of php. I can guide you through all steps, please tell me if you didn't understand, I don't explain stuff well.
1) Create a new page, by creating two .php files (it's how you create a yoursite.com/pagename instead of a yoursite.com/pages/view/pagesname):
PHP Code:
2) If you go to yourwebsite.com/jobs the page should exist now. This is how the two files work as a page:
3) To add text to the page you do this: $document->add(new Comment("content that can have html as well.")); If you want to respect the View-Controller, this would be done in the view. If you check the page yourwebsite.com/jobs, the text should be there 4) Now, we need something for the user to click to request money. Like a button saying "Work!". However, in order to submit something, to send information somewhere, a "trigger" needs to exist. So we attach the button to a Form. Forms can have multiple elements to request information from the user (textfields, radio buttons...) and then a nice button in order to send the form with the information. In this case, a form with a single with a button is enough, since you just want a little button to send money. Users click and money is sent. To add a form with a button to the page you do this: PHP Code:
5) This part needs some understanding of if conditions in programming and scope. To check if the button submitted, you add this to the page: PHP Code:
PHP Code:
PHP Code:
Open the database with phpMyAdmin or whatever infertace used to facilitate the control of the database. You will see multiple tables. In the (prefixYouChose)_users, add a new column called lastWorkTime for example, with a type varchar, size 20, can be null and the predefined value for when it's null is NULL (if it asks you for that). Usually you go in structure and then there must be a place to add a column to the table. Everyone should have that column set to null now. Open the file class_member.php and add the new variable you created to the top next to other ones. Below __construct() create a function to check the user's last time working and another to update this time. PHP Code:
PHP Code:
__________________
![]() ![]() ![]() asp.net stole my soul. |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Using Javascript Games to Give Users Currency | Hwona | Questions and Supports | 2 | 12-13-2015 05:01 AM |
How to earn money on site? O.o | Rovick | Questions and Supports | 2 | 06-29-2014 03:31 AM |
Page that gives users money | Derpstra | Tutorials and Tips | 0 | 08-18-2012 11:34 AM |
Change earn money | jcga1992 | Questions and Supports | 1 | 04-24-2012 10:39 AM |
Earn Random Amounts of Money | Rissan | Suggestions and Feature Requests | 2 | 08-25-2011 09:51 PM |
What's New? |
What's Hot? |
What's Popular? |