Jump to content

HTML/JS help, turn Var into index.html

Hello !

I need help. Im making a simple page for people to post messages that are updated 3-4 times per week. for people with absolutly 0 knowledge of computers.

im currently doing a form that stores the info in a variable (as a string with html code in it)

I want to, when I click "update"  that the server takes that string, copy it and replace the text inside the index.html file somewhere else on the website (the display page)

how do I do that ?

~New~  BoomBerryPi project !  ~New~


new build log : http://linustechtips.com/main/topic/533392-build-log-the-scrap-simulator-x/?p=7078757 (5 screen flight sim for 620$ CAD)LTT Web Challenge is back ! go here  :  http://linustechtips.com/main/topic/448184-ltt-web-challenge-3-v21/#entry601004

Link to comment
Share on other sites

Link to post
Share on other sites

are you using php?

use the form to submit to a php page that will take the form data and store it in a database.

On your index page, make a php script that pulls from the data base to display the form data.

here is a tutorial https://www.w3schools.com/php/php_mysql_intro.asp

             ☼

ψ ︿_____︿_ψ_   

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, SCHISCHKA said:

are you using php?

use the form to submit to a php page that will take the form data and store it in a database.

On your index page, make a php script that pulls from the data base to display the form data.

here is a tutorial https://www.w3schools.com/php/php_mysql_intro.asp

iv never done php, and my db skills are very low. I barely know how to make it work, never actually pulled data from a server.

I ill try. but if there's a simpler solution that would be great. 

Thanks.

~New~  BoomBerryPi project !  ~New~


new build log : http://linustechtips.com/main/topic/533392-build-log-the-scrap-simulator-x/?p=7078757 (5 screen flight sim for 620$ CAD)LTT Web Challenge is back ! go here  :  http://linustechtips.com/main/topic/448184-ltt-web-challenge-3-v21/#entry601004

Link to comment
Share on other sites

Link to post
Share on other sites

32 minutes ago, givingtnt said:

I ill try. but if there's a simpler solution that would be great. 

using a database is the simplest solution, otherwise you would be trying to replicate all the things that a database does.

             ☼

ψ ︿_____︿_ψ_   

Link to comment
Share on other sites

Link to post
Share on other sites

2 hours ago, givingtnt said:

Hello !

I need help. Im making a simple page for people to post messages that are updated 3-4 times per week. for people with absolutly 0 knowledge of computers.

im currently doing a form that stores the info in a variable (as a string with html code in it)

I want to, when I click "update"  that the server takes that string, copy it and replace the text inside the index.html file somewhere else on the website (the display page)

how do I do that ?

I can think of a way of doing that using a Node.JS server and AngularJS, but it's more of a weekend project sort of deal if you haven't done full-stack before.

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, M.Yurizaki said:

I can think of a way of doing that using a Node.JS server and AngularJS, but it's more of a weekend project sort of deal if you haven't done full-stack before.

im pretty far from being a full-stack dev xD

im in college still :S 

~New~  BoomBerryPi project !  ~New~


new build log : http://linustechtips.com/main/topic/533392-build-log-the-scrap-simulator-x/?p=7078757 (5 screen flight sim for 620$ CAD)LTT Web Challenge is back ! go here  :  http://linustechtips.com/main/topic/448184-ltt-web-challenge-3-v21/#entry601004

Link to comment
Share on other sites

Link to post
Share on other sites

3 minutes ago, givingtnt said:

im pretty far from being a full-stack dev xD

im in college still :S 

If it's a demo site though, something you don't necessarily need a server for, you can do HTML and AngularJS or JQuery. JQuery's easier to wrap your head around, but AngularJS does a lot of automagic things.

 

But if you want some help I can do so over PM whenever I can get to it.

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, M.Yurizaki said:

If it's a demo site though, something you don't necessarily need a server for, you can do HTML and AngularJS or JQuery. JQuery's easier to wrap your head around, but AngularJS does a lot of automagic things.

 

But if you want some help I can do so over PM whenever I can get to it.

that would be cool
basically, all I want to do is be able to put text in different sections. and have it update the view page.

~New~  BoomBerryPi project !  ~New~


new build log : http://linustechtips.com/main/topic/533392-build-log-the-scrap-simulator-x/?p=7078757 (5 screen flight sim for 620$ CAD)LTT Web Challenge is back ! go here  :  http://linustechtips.com/main/topic/448184-ltt-web-challenge-3-v21/#entry601004

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, M.Yurizaki said:

https://www.w3schools.com/angular/angular_model.asp

 

Let me know how easy or hard that is to understand :3

 

I think I can understand the structure, but iv never done angular or JQ xD just plain JS

~New~  BoomBerryPi project !  ~New~


new build log : http://linustechtips.com/main/topic/533392-build-log-the-scrap-simulator-x/?p=7078757 (5 screen flight sim for 620$ CAD)LTT Web Challenge is back ! go here  :  http://linustechtips.com/main/topic/448184-ltt-web-challenge-3-v21/#entry601004

Link to comment
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

×