Jump to content

Right, so i need to have a system whereby the user can sign up for a lesson. This would have a box for mane, the day, the time of the lesson and a radio button with group lesson or single lesson. I want this ideally to be saved to a file on my file server (the same one that hosts the web server). i have NO knowledge of databases or PHP or how to set them up, so i would rather use HTML and JavaScript. It needs to be fairly lightweight as the people who will be running it will not have fast PCs *they are mostly old ladies*. Any help would be appreciated

Link to comment
https://linustechtips.com/topic/879040-help-with-website/
Share on other sites

Link to post
Share on other sites

16 minutes ago, Joelsome said:

i have NO knowledge of databases or PHP or how to set them up, so i

You might want to look into "usbwebserver". It has apache, php and mysql. All you would need for a small in-home webserver. LOADS of knowlage is out there, and you can, if you want, just have php create a .txt file with the info, or add a few lines to the txt file. (no databases required in that example)

 

Try w3schools, they have lots of easy tutorials.

Link to comment
https://linustechtips.com/topic/879040-help-with-website/#findComment-10872703
Share on other sites

Link to post
Share on other sites

1 minute ago, Dutch-stoner said:

You might want to look into "usbwebserver". It has apache, php and mysql. All you would need for a small in-home webserver. LOADS of knowlage is out there, and you can, if you want, just have php create a .txt file with the info, or add a few lines to the txt file. (no databases required in that example)

 

Try w3schools, they have lots of easy tutorials.

I have the web server hosted on my OMV nas with the plugin Nginx. It can do PHP but i don't think it can do MySQL. I have already done loads of research and i couldn't find anything on saving it to a txt file, apart from to the person accessing the site's computer.

Link to comment
https://linustechtips.com/topic/879040-help-with-website/#findComment-10872712
Share on other sites

Link to post
Share on other sites

1 minute ago, Dutch-stoner said:

What brand of internet do you have? Because it sounds like it's really shitty. I bet no google also.

 

Anyways, I should be friendly and helpfull.

Searched for: w3school php write to txt

https://www.w3schools.com/php/php_file_create.asp

How would i get the data into that script without manualy editing the php? Sorry for not being good at googling... and sorry for my lack of intelligence, i am completely new to this

Link to comment
https://linustechtips.com/topic/879040-help-with-website/#findComment-10872724
Share on other sites

Link to post
Share on other sites

I think you should have started with another kind of topic title. "help with website" should have been "need someone to create a small website for me".

 

You can create a regular html page with a form on it. Then send the results to a php page, which processes the fields and writes results to the .txt file.

 

Yes, you can have a notification send to you by mail. However, your "webserver" needs to be configured. (it needs an SMTP server, which could possibly be just some gmail smtp servers, not sure, haven't played with that for a long time) And since you are using a NAS with a server pack I don't know, I don't know how easy/hard it is to configure your server for outgoing mail.

(php has a function to send mail, moar info at how to use the function can be found here: https://www.w3schools.com/php/func_mail_mail.asp)

 

Considering your project webpage is easy, I would suggest a (free) page built. Make up something like goodwill, and the elderly and I am sure there is someone who wants to help. (not me, year change and all, no time)

 

Why not Javascript? Javascript is usually client side, while you want stuff done (list created) on the server side. You could go nodeJS,, but not sure if and how that would work on your server/NAS. (not an javascript/jquery/ajax expert at all)

Link to comment
https://linustechtips.com/topic/879040-help-with-website/#findComment-10872756
Share on other sites

Link to post
Share on other sites

6 minutes ago, Dutch-stoner said:

I think you should have started with another kind of topic title. "help with website" should have been "need someone to create a small website for me".

 

You can create a regular html page with a form on it. Then send the results to a php page, which processes the fields and writes results to the .txt file.

 

Yes, you can have a notification send to you by mail. However, your "webserver" needs to be configured. (it needs an SMTP server, which could possibly be just some gmail smtp servers, not sure, haven't played with that for a long time) And since you are using a NAS with a server pack I don't know, I don't know how easy/hard it is to configure your server for outgoing mail.

(php has a function to send mail, moar info at how to use the function can be found here: https://www.w3schools.com/php/func_mail_mail.asp)

 

Considering your project webpage is easy, I would suggest a (free) page built. Make up something like goodwill, and the elderly and I am sure there is someone who wants to help. (not me, year change and all, no time)

 

Why not Javascript? Javascript is usually client side, while you want stuff done (list created) on the server side. You could go nodeJS,, but not sure if and how that would work on your server/NAS. (not an javascript/jquery/ajax expert at all)

I don't really need someone to build the whole site for me, just some help with this. I know how to build the HTML form, but how do i get that data into the PHP? I know about the POST stuff, but when i tried to implement that, it downloaded the php onto my PC...

Link to comment
https://linustechtips.com/topic/879040-help-with-website/#findComment-10872789
Share on other sites

Link to post
Share on other sites

<form method="POST" action="process.php">
	<p>Name: <input type="text" name="T1" size="20"></p>
	<p>Day (dd-mm-yyyy): <input type="text" name="day" size="2">-<input type="text" name="month" size="2">-<input type="text" name="year" size="4"></p>
	<p>Time (hh-mm): <input type="text" name="hour" size="2">:<input type="text" name="minute" size="2"></p>
	<p>Group/single: <select size="1" name="type">
	<option selected value="Single person">Single</option>
	<option value="Group please">Group</option>
	</select></p>
	<p><input type="submit" value="Submit" name="B1"><input type="reset" value="Reset" name="B2"></p>
</form>

Example very basic form, html, made in frontpage 2003. (old af software, but I still use it/code is valid)

 

This will send the info/data to a php file called "process.php". You should run the html page in your browser. Not just open the file, but go to the actual location on your intranet and/or public IP adress. (http://192.168.x.x/loginform.htm for example)

Link to comment
https://linustechtips.com/topic/879040-help-with-website/#findComment-10872801
Share on other sites

Link to post
Share on other sites

Try google forms or something like that, or pay a webdev ;) 

Business Management Student @ University St. Gallen (Switzerland)

HomeServer: i7 4930k - GTX 1070ti - ASUS Rampage IV Gene - 32Gb Ram

Laptop: MacBook Pro Retina 15" 2018

Operating Systems (Virtualised using VMware): Windows Pro 10, Cent OS 7

Occupation: Software Engineer

Link to comment
https://linustechtips.com/topic/879040-help-with-website/#findComment-10872849
Share on other sites

Link to post
Share on other sites

12 minutes ago, Dutch-stoner said:

<form method="POST" action="process.php">
	<p>Name: <input type="text" name="T1" size="20"></p>
	<p>Day (dd-mm-yyyy): <input type="text" name="day" size="2">-<input type="text" name="month" size="2">-<input type="text" name="year" size="4"></p>
	<p>Time (hh-mm): <input type="text" name="hour" size="2">:<input type="text" name="minute" size="2"></p>
	<p>Group/single: <select size="1" name="type">
	<option selected value="Single person">Single</option>
	<option value="Group please">Group</option>
	</select></p>
	<p><input type="submit" value="Submit" name="B1"><input type="reset" value="Reset" name="B2"></p>
</form>

Example very basic form, html, made in frontpage 2003. (old af software, but I still use it/code is valid)

 

This will send the info/data to a php file called "process.php". You should run the html page in your browser. Not just open the file, but go to the actual location on your intranet and/or public IP adress. (http://192.168.x.x/loginform.htm for example)

Do i use this in tandem with the w3schools thing?

Link to comment
https://linustechtips.com/topic/879040-help-with-website/#findComment-10872854
Share on other sites

Link to post
Share on other sites

On 12/29/2017 at 2:50 PM, Joelsome said:

I want this ideally to be saved to a file on my file server

 

On 12/29/2017 at 2:50 PM, Joelsome said:

i have NO knowledge of databases

If you are saving to a file you have no need for a database.

 

On 12/29/2017 at 2:50 PM, Joelsome said:

It needs to be fairly lightweight as the people who will be running it will not have fast PCs *they are mostly old ladies*. Any help would be appreciated

The code is running on your server, not the client. 

 

On 12/29/2017 at 2:50 PM, Joelsome said:

so i would rather use HTML and JavaScript.

Then why don't you use nodeJS?

 

 

                     ¸„»°'´¸„»°'´ Vorticalbox `'°«„¸`'°«„¸
`'°«„¸¸„»°'´¸„»°'´`'°«„¸Scientia Potentia est  ¸„»°'´`'°«„¸`'°«„¸¸„»°'´

Link to comment
https://linustechtips.com/topic/879040-help-with-website/#findComment-10876829
Share on other sites

Link to post
Share on other sites

1 hour ago, vorticalbox said:

 

If you are saving to a file you have no need for a database.

 

The code is running on your server, not the client. 

 

Then why don't you use nodeJS?

 

 

i have no idea how to use Node JS or even what it is... I am very new to this

 

Link to comment
https://linustechtips.com/topic/879040-help-with-website/#findComment-10877079
Share on other sites

Link to post
Share on other sites

39 minutes ago, Joelsome said:

i have no idea how to use Node JS or even what it is... I am very new to this

 

Node is a server side language that uses JavaScript. 

 

If I had time I would write you a quick demo of getting form data and posting it to a file. 

 

If I get time tomorrow I'll wrote something up

                     ¸„»°'´¸„»°'´ Vorticalbox `'°«„¸`'°«„¸
`'°«„¸¸„»°'´¸„»°'´`'°«„¸Scientia Potentia est  ¸„»°'´`'°«„¸`'°«„¸¸„»°'´

Link to comment
https://linustechtips.com/topic/879040-help-with-website/#findComment-10877211
Share on other sites

Link to post
Share on other sites

On 29/12/2017 at 5:04 PM, Cruorzy said:

List what you wan't if it is done within an hours and you can setup a PHP running environment then I might be able to make some backend code for you.

Cool, what i want is a form that takes the following info:

(Wednesday Groups)

Full Name:

Dog(s) Name:

Telephone Number:

Dog(s) Grade(s):

Date(s) of lesson(s):

Time(s) of lesson(s):

and then a box for a user to type a few lines about what they would particulary like to work on during the lesson.

 

Then a separate form (training days) that says:

Name:

Dog's Name:

Training Day/Workshop.

 

If possible i would like an email to be sent out every time someone fills in the form (to me)

I think i have a PHP thing on my server not sure if it works though as i have nothing to test it with...

Thanks for helping.

44 minutes ago, vorticalbox said:

Node is a server side language that uses JavaScript. 

 

If I had time I would write you a quick demo of getting form data and posting it to a file. 

 

If I get time tomorrow I'll wrote something up

Nice

 

 

 

Link to comment
https://linustechtips.com/topic/879040-help-with-website/#findComment-10877357
Share on other sites

Link to post
Share on other sites

10 minutes ago, Cruorzy said:

@Joelsome I let @vorticalbox handle it :)

Ty lol. I'll see what I can do tomorrow.

 

9 minutes ago, Joelsome said:

OK :-)

Are you wanting this to be ran on a server or on peoples pc? With node you can just run it on any computer with node installed and it will handle the web server. 

 

If on pc you can bundle it into an electron app or of someone gets in before me php will work find too. 

                     ¸„»°'´¸„»°'´ Vorticalbox `'°«„¸`'°«„¸
`'°«„¸¸„»°'´¸„»°'´`'°«„¸Scientia Potentia est  ¸„»°'´`'°«„¸`'°«„¸¸„»°'´

Link to comment
https://linustechtips.com/topic/879040-help-with-website/#findComment-10877459
Share on other sites

Link to post
Share on other sites

14 hours ago, vorticalbox said:

Ty lol. I'll see what I can do tomorrow.

 

Are you wanting this to be ran on a server or on peoples pc? With node you can just run it on any computer with node installed and it will handle the web server. 

 

If on pc you can bundle it into an electron app or of someone gets in before me php will work find too. 

I would prefer it to be server based. At the moment i know my server can run HTML and JAVASCRIPT but i don't know about node (i would assume yes as it is a form of javascript) I am using the Nginx plugin for OpenMediaVault (OMV). I am not sure that PHP will work or that i have permissions set up right as @Dutch-stoner's Code returned the same cant write to file error... I have scoured the internet for hours but it looks like i am one of very few to be using the plugin. It needs to just work on every computer, as the people who will be using it don't exactly have 7980XEs in their PCs... Probably more along the lines of pentium 4...

Link to comment
https://linustechtips.com/topic/879040-help-with-website/#findComment-10879730
Share on other sites

Link to post
Share on other sites

14 minutes ago, Joelsome said:

I would prefer it to be server based. At the moment i know my server can run HTML and JAVASCRIPT but i don't know about node (i would assume yes as it is a form of javascript) I am using the Nginx plugin for OpenMediaVault (OMV). I am not sure that PHP will work or that i have permissions set up right as @Dutch-stoner's Code returned the same cant write to file error... I have scoured the internet for hours but it looks like i am one of very few to be using the plugin. It needs to just work on every computer, as the people who will be using it don't exactly have 7980XEs in their PCs... Probably more along the lines of pentium 4...

Server is doing all of the logic behind, how heavy the site is depends on how pretty of a front-end you want.

If you wanna do all kind of mad animations with CSS and Javascript then it is going to be heavier then needed.

 

The logic written in PHP/NodeJS or any other back-end language will be run on the server and totally NOT affect the USER of the website.

Quote or mention me if not feel ignored 

Link to comment
https://linustechtips.com/topic/879040-help-with-website/#findComment-10879755
Share on other sites

Link to post
Share on other sites

Just now, Cruorzy said:

Server is doing all of the logic behind, how heavy the site is depends on how pretty of a front-end you want.

If you wanna do all kind of mad animations with CSS and Javascript then it is going to be heavier then needed.

 

The logic written in PHP/NodeJS or any other back-end language will be run on the server and totally NOT affect the USER of the website.

OK, i don't plan on doing any fancy animation at all really. I want to do a pop up thing for the front page as it launches tonight, sorta to say "hey look, new site way better than the old weebly one we had before ;-)". Im making a separate test server so that we can test things that get suggested on here separate from the main page. 

Link to comment
https://linustechtips.com/topic/879040-help-with-website/#findComment-10879762
Share on other sites

Link to post
Share on other sites

5 minutes ago, Joelsome said:

OK, i don't plan on doing any fancy animation at all really. I want to do a pop up thing for the front page as it launches tonight, sorta to say "hey look, new site way better than the old weebly one we had before ;-)". Im making a separate test server so that we can test things that get suggested on here separate from the main page. 

With plans like that you should really invest more time in learning some back-end language and version control, you can't be the guy who posts it all on a forum hack something together and pray to the almighty coder god it works.

 

Not pushing thing to hard is a advice I would give, take time to learn something like NodeJS, PHP or anything else.

Coding is on of the most useful skills to have these days.

Quote or mention me if not feel ignored 

Link to comment
https://linustechtips.com/topic/879040-help-with-website/#findComment-10879785
Share on other sites

Link to post
Share on other sites

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

×