Jump to content

Search the Community

Showing results for tags 'home made cms'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 1 result

  1. Hello: This is my first posting, I am fairly new to PHP and Javascript, so please be nice! I have a question regarding a "Home Made" CMS for just a couple sections of the HTML on a site. I have managed to obtain the HTML by calling it with "Include" I use a couple forms which will gather the data to use for the change, then obtain the id of the DIV to change, all the changes happen by using some JQuery/Javascript, but since it is made by Javascript, all happens "Client side"... I am stuck here... and would like to see if there is a way to make PHP take the new changes into variables that will then replace the content in the HTML file? Let's say... I have a Fuel Pump and I have published the fuel price on my site... I have to change the price every day... so I want a small "admin portal" where I can type the fuel price and with it submit the changes to the site... here is the sample code I have been playing with so far... <html> <head> <link href="test.css" rel="stylesheet" type="text/css"> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"> </script> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Testing Changes</title> </head> <body> This section has the area you can modify:<br> <br> <form method="GET"> Change Fisrt line with: <input type="text" name="gasPrice1"><br> Change Second line with: <input type="text" name="gasPrice2"><br> <input type="submit" value="Change!"> </body> </html> <?php echo "<br><br>"; include 'index.html'; echo "<br><br>"; $var1 = $_GET["gasPrice1"]; $var2 = $_GET["gasPrice2"]; echo "<br>"; echo $var1 . " This is the echo from the first Variable"; echo "<br>"; echo $var2 . " This is the echo from the second Variable"; ?> <script> var gPrice1 = "<?php echo $var1; ?>"; $(document).ready(function(){ $("#text1").text(gPrice1); }); var gPrice2 = "<?php echo $var2; ?>"; $(document).ready(function(){ $("#text2").text(gPrice2); }); var txt=document.getElementById("text1").innerHTML; document.write(txt); </script>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.