Jump to content

Quick QUestion


prcollin

Recommended Posts

How do i get it so that a web page updates every time a form is submitted to reflect the submitted values

 

so i have a site that has like

 

first name

last name

age

height

weight

 

and i have an update form that allows the user to change their weight

 

I want it so that the web page automatically updates when the weight form is submitted

 

any ideas.  I have the create table script, the inserting into the table script now i just need a way to post the variables to the web page after submittal

Link to comment
https://forums.phpfreaks.com/topic/106719-quick-question/
Share on other sites

You need to save the information on the server somehow. Either with a database or a text file. Then I would use php to parse that information to display.

 

This is what i have so far

 

Create the table

 

//load libraries
$this->execPieceByName ('ff_InitLib');
//create the table

ff_query (
"CREATE TABLE IF NOT EXISTS 'xxx_newusersignup' (".
" 'id' int(15) NOT NULL auto_increment, ".
" 'first_name' varchar(25) default NULL, ".
" 'last_name' varchar(25) default NULL, ".
" 'd_o_b' varchar(6) default NULL, ".
" 'height' varchar(5) default NULL, ". 
" 'weight' varchar(3) default NULL, ".
" 'info' varchar(1000) default NULL, ".
" PRIMARY KEY ('id') ".

") Engine = MyIsam Default Charset=latin1 auto_increment=1 "
);

 

Insert into the db

 

global $my
// load standard submit utilities
$this-> execPieceByName('ff_initlib') ;

// Retrieve the submitted values
$id = ff_getSubmit('id');
$first_name = ff_getSubmit('first_name');
$last_name = ff_getSubmit('last_name');
$age = ff_getSubmit('age');
$height = ff_getSubmit('height');
$weight = ff_getSubmit('weight');
$info = ff_getSubmit('weight');

//the submit query
ff_query (
"insert_into 'xxx_newusersignup' ".
"('id', 'first_name', 'last_name', 'age', 'height', 'weight', 'info') "
" values('$id', '$first_name', '$last_name', '$age', '$height', '$weight', '$info') "
);

 

Now i just need to know how to get a web page called www.findzer.com/userpages/user001.html to reflect the values submitted here and update each time a new form is submitted

 

Link to comment
https://forums.phpfreaks.com/topic/106719-quick-question/#findComment-547058
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.