473,388 Members | 1,493 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

how do we display data on the front end like a chemical formula for sugar

how do we display data on the front end like a chemical formula for sugar when entered via the admin panel. like a CMS
Jul 17 '07 #1
4 1716
Motoma
3,237 Expert 2GB
how do we display data on the front end like a chemical formula for sugar when entered via the admin panel. like a CMS
I'm sure your solution will involve a database. Perhaps you could better explain what you are looking for for an answer?
Jul 17 '07 #2
I'm sure your solution will involve a database. Perhaps you could better explain what you are looking for for an answer?
Dear Motoma,
thanks for replying! What i need is that suppose like an Content Management System(admin section) i need to enter something into a text box which when saved goes and gets changed into the front end website. how do i enter something like a chemical formula of sugar in its original form and get it to display at the front end in the correct form. Eg. c6h12o6
Jul 18 '07 #3
Motoma
3,237 Expert 2GB
Dear Motoma,
thanks for replying! What i need is that suppose like an Content Management System(admin section) i need to enter something into a text box which when saved goes and gets changed into the front end website. how do i enter something like a chemical formula of sugar in its original form and get it to display at the front end in the correct form. Eg. c6h12o6
I am assuming you would have a database back end containing the lookup values for your input related to the corresponding output.

I'm afraid I don't fully understand what you are aiming for. Perhaps if you gave sample input and output, as well as how the system should be able to relate the two, I could give you better insight.
Jul 18 '07 #4
tscott
22
Easy if you don't want to use MySQL...
I'm assuming you have an admin panel/password verification.
[php]
<?php
$password = 'randompass';
$checkpass = $_POST['passsword'[;
if(!$password == $checkpass)
{
echo 'Incorrect Password';
exit;
}
function edit($data , $file)
{
//Creating Connection to file//
$connection = fopen($file , 'w');
//Making sure there is a connection//
if(!$connection)
{
echo 'Please CHMOD your directory or create the file';
}
//Write Data to the file//
fwrite($connection , $data);
if(file_get_contents($file) == $data)
{
echo 'Successfully updated your front end';
}
}
$data = $_POST['data']; //Data from your form//
$file = $_POST['file']; //File From your form(Can be anything//
edit($data , $file);
//Okay now include the file you just created where you want your data to be using//
//Example : include('front.php');//
?>
[/php]
This is a relatively simple way to do it, You could use a database. Kind of a pain in the butt to do if you ask me. Be sure if you use this to set a pass at the variable above labeled password which is set to random. If you would like a form ask and I'll make one for you.
~Tyler
Jul 19 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Kay | last post by:
This function is used to display the context of a queue. I input an integer comparing with the queue cuisine number, if cuisine number is same as the input, it shows the context. However, it cannot...
1
by: The Doctor | last post by:
Is there a way to do this?? I would like to stay away from XML is possible. -- Member - Liberal International This is doctor@nl2k.ab.ca Ici doctor@nl2k.ab.ca God Queen and country! Beware...
8
by: Colleyville Alan | last post by:
I have been working on an Access app that takes info from a file and writes it to a spreadsheet on a form, simultaneously saving the spreadsheet to Excel. I got the idea that the same concept...
4
by: Bas | last post by:
Hi group, just out of curiosity, is there a list of all the syntactic sugar that is used in python? If there isn't such a list, could it be put on a wiki somewhere? The bit of sugar that I do...
13
by: Sam Kong | last post by:
Hi, While discussing C#'s using statement, a guy and I had an argument. In C# spec (15.13), there's an explanation like the following. using (R r1 = new R()) { r1.F(); } is precisely...
18
by: robert | last post by:
Is there a ready made function in numpy/scipy to compute the correlation y=mx+o of an X and Y fast: m, m-err, o, o-err, r-coef,r-coef-err ? Or a formula to to compute the 3 error ranges? ...
4
by: stj911 | last post by:
http://counterpunch.org/rahni04072007.html Test Tube Zealots: The American Chemical Society Terminates the Membership of Chemists from Iran By DAVID N. RAHNI The American Chemical Society...
11
by: Helmut Jarausch | last post by:
Hi, are decorators more than just syntactic sugar in python 2.x and what about python 3k ? How can I find out the predefined decorators? Many thanks for your help, Helmut Jarausch
24
by: joeldault | last post by:
Question For Microsoft Access Data Base -------------------------------------------------------------------------------- I am Trying to create a single formula that would do the following: If...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.