Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    PHP


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





Create A Data Entry HTML Form For Given Table


I am working on a simple web site updating utility for a web site. Rather than hard code the data entry forms, I would like to automactically generate them based upon the table a user selects to update or insert into. What is the best way to approach this?

for "insert" should I use the MySQL DESCRIBE table command and build a form element for each field according to its data type? for "update" should I use the DESCRIBE command to build the form as above and SELECT statement to populate each element with data, or should I just use a SELECT statement to retrieve the data and use php to determine the field type and choose an appropriate form element?




View Complete Forum Thread with Replies

Related Forum Messages:
Create A Form In HTML And A PHP Page For Validating The Data Entered Into The Form
I've tried to create a form in HTML and a PHP page for validating the data entered into the form and adding them into a MySQL database.

However, when i tried them out, it happens that after i press the submit button in the HTML page, it just show a blank page instead of what i expect. I've tried several times, but it is still the same and i don't know what is going wrong. Code:

View Replies !
Validate Data Before Making Entry Into Table
I'm looking to check a table to see if an entry is in before it adds and entry.

I need to check a field in a table based on what the post data is.

So I need to check

$s_POST['fname']; is not already in the table.

View Replies !
Formatting Form Entry Into HTML
I was wondering how to go about allowing the information submitted into a form for something like a news service with a Mysql backend to have the ability to be formatted by the user for HTML attributes such as bolding text etc.

This question came about because I set up a press release and news section and have noticed that a number of users have asked if there was any way to make list items in their posts, and I wasn't sure what was needed to allow that type of functionality. Does it mean I have to start getting into WYSIWYG editors and the likes, or are their easier ways of doing it?

View Replies !
Pre-selecting Options In Html-form According To Database Entry
I've got a html-form consisting - among other fields - of several drop-down-boxes and radio button groups. With this form you should be able to either create a new dataset or to edit an existing one.

If the latter is the case, my application should propose values (the ones which are already in the database) and write them into the input-fields. My problem is, it should have the according options pre-selected and the checkboxes checked, and I've no idea how to do this.

(Example: I've a dropdown box for languages, and my dataset says the language is English, then in my dropdown box the option "English" should be preselected when this dataset is to be edited).

View Replies !
Php Adodb Data Entry Form Question
i'm new to using php, adodb and pgsql. i have a need to enter data
into a database.

in general terms, does it go like this...

1. create form on first web page.
2. send form to a 2nd web page via the form's method and action
propertise (and submit button).
3. put php the same 2nd web page so that variables are taken from the
entry form page and use adodb to perform the insert into the database.
4. have the 2nd web page send the user back to a third page confirming
their data entry and offering them the opportunity to add more data.

is this correct? what is the best way to do this?

View Replies !
Data Entry Form With Dynamic Dropdown Boxes
I am working on a Form for user to register & enter their info such as name, email, address, tel etc. and I put in a couple of dropdown boxes namely country and city where user can select. I made them dynamic, i.e. the city dropdown is based on the selected value from country and the data retrieved from MySQL database.

The problem I have is the Javascript script involved a reload of the form and once I select a value from Country, the city dropdown populated with data OK but the data entered beforehand (Name, email, etc.) disappeared.

View Replies !
Create Html Table
tryin to get a table to add a new td /td for every result from the Db. but can't for life of me figure it out...

the nubers are the results and there are 3 required infos from each entry,(abc)
so if there were 4 results it would have a 4a,4b,4c...

its prob really simple but i cant get it! how would i print it via PHP? Code:

View Replies !
RegExp - Removing Newline/carriage Return In Data Entry/form Field
I have a database generated calendar (written in php) which puts the contents of one of the fields in a javascript mouseover popup ( Carriage Driving World and select "Calendar" from top menu) which is populated by event organizers entering data via a form. Some people are putting line feeds in their EventDesc (field used for javascript mouseover popup) which screws up the javascript, where linefeeds/newlines aren't allowed.

The best solution I can think of is to either remove the linefeeds before the data gets stuffed into the database or when the data is presented to the javascript coding.

Here's where I need help. What RegExp string do I use to pull linefeeds/returns? Some of teh entries have more than one which needs removed.

View Replies !
Competition Entry Form / Random Entry Draw Script
I'm looking for an easy method to implement an 'entry form' for an online competition on my website (a competition page, if you like).

As I am running a 'trade promotion' I will need to apply for a trade permit license, therefore will need to satisfy the local authorities that the entry form and drawing method are acceptible.

The competition page will feature the prize on offer and the fields for entrants to fill in their details.

The tricky part I think is that I then require the entries to be able to be 'drawn randomly' once the competition has ended. Any tips here on how to successfully and easily run a competition from your site?

View Replies !
Create Html Table With Php Result?
I'm looking to display 5 records in one rows, from the database. What i mean is, basically, let's take the "emails" as an example. I have a table with 100s of email
addresses. Now i want to display these email addresses on a html table, but i want to display only 5 email adresses per table row, then the next 5 in the next table row and so
on.

View Replies !
How To Insert Data Into One Form ,the Form Include 2 Table Data In Database
i had create a form and i want to insert the data, but my form was include the data from 2 table , wat will be the query looked like, can somebody give me the example ? How to do it?

View Replies !
Create A Link In A Table From Echo 'ed Sql Data
im using the following code to output everything in a database table under headings in an html table untill theres no more data left. The headings are things like name address etc.

could i make it so when all the data is shown each name or ID becomes a link and when clicked takes the user to a more detailed page on the selected client.

because of the way the table is generated there is no where to place link tags. is there a more appropriate way that is more editable?

it would be nice to have checkboxes at the edge of each customer also to enable a complete status or deleting a client from the table. Code:

View Replies !
Create Form Linked To Html
I need to access an SQL database from a webpage so users can update information directly to the database (in the form of a "form"). There are a few fields from different tables in SQL that I need on the form. I have no idea how to even begin. Someone mentioned that PHP is the way to go and I've started looking through tutorials, but thought I would post the question to see if this is even the right language to use.

View Replies !
Create A Page With A Form To Search Entries Into This Table
I have a table called "lista" into my mysql database.This table has 5 text columns : "TRANSLATEDTITLE" "ORIGINALTITLE" "ACTORS" "DIRECTOR" "YEAR" , and 1 image column called "COVER".

I want to create a page with a form to search entries into this table, and anotger php page with the search results shown inside, everyone with a link that opens a pop window (ex. 400X320).

View Replies !
Converting Table Data From HTML To PHP
I have a problem converting data from a html file, to a 3 way split. (header.php index.php and footer.php, Reason being PHP won't parse the following line,
<table width="37%" border="0" cellspacing="0" cellpadding="0" height="163">
I think it all revolves around the % sign, does anyone have any ideas about how to fix it without limiting the width to X amount of pixels?

View Replies !
HTML Table With Data From Two Recordsets
I have two MySQL tables, say one is author and one is books. Author contains a unique PK say author_id Books contains an author_id also which links across to the author table. Usual stuff. My problem is getting at the info.

If I wanted to display the info, in it's mnost basic format, I would set up a HTML table with the columns and repeat the row. PHP Code:

View Replies !
Extract Data From Table Html
I would like to extract data from the table attached.
Could someone help me to create the regular expression to grab that
informations?

View Replies !
Displaying Data In Html Table.
I wondered if anyone could offer some guidance, I trying to write a
php script to connect to a database, and display the records in a
table.

I found the code here in a php4 text, and when I run this directly
through the php intrupeter, the line Successfully connected is display
and 4 as the number of rows.

The database table we connect to, has three field username, firstname,
surname.

When I tried a while loop, to display the data in a table. No values
were displayed.

Could anyone possibly demonstrate how to display the username,
firstname, surname values in a basic table?

<?php
function db_connect(){
global $MYSQL_ERRNO, $MYSQL_ERROR;

$link_id = mysql_connect("localhost","user04", "password04");

if(!$link_id){
$MYSQL_ERROR = "Connection failed";
return 0;
}
else if(empty($dbname) && !mysql_select_db("database04")){
$MYSQL_ERROR = mysql_error();
return 0;
}
else return $link_id;
}

!$link_id = db_connect();
if(!$link_id) die(error_message('Error connecting'));

$result = mysql_query("SELECT * FROM users");
if(!$result) error_message('Error in selection');
else echo "Successfully connected. ";

$query_data = mysql_fetch_row($result);
$total_records = $query_data[0];

if(!$total_records) error_message('No records');
else echo "$total_records.";
?>

View Replies !
HTML Table Data Into Array
I want to know if it already exists. I need some PHP code that will read a web page and return all text that comes between <td></td> tags in an array. So if there were three tables on that page, it would return the first table's fourth row, third column in a variable such as:

$tableArray[0][3][1]
// ^ ^ ^ - 2nd <td></td>
// ^ ^ - 4th <tr></tr>
// ^ - 1st <table></table>

Does something like this exist somewhere where I can grab it, or do I have
to build it from scratch?

View Replies !
Display Data In An Html Table
This is actually 2 questions. I am managing a website for daily homework. I have a form that teachers fill in for each day of the week. The database uses the ID as primary with auto increment. What I'd like to do is call the latest homework entry by day and have the homework display when the 'Homework' page is opened.

I want to keep it in the database. To get the last entry someone suggested using select LAST_INSERT_ID FROM QUESTION 1: Will this work? Suggestions? QUESTION 2: How do I get the database data to display in a table that has each day of the week and each subject.

View Replies !
Php Array Data To Html Table
I parse an XML file every day into php and use the print_r() function to display the contents. It looks like this:

<Name="JOE" score="1.2538" />
<Name="BOB" score="136.69" />
<Name="ANN" score="0.5729" />

View Replies !
Insert Data In A Html Table
here is the code:

<?
$a=array(1,2,3,4,5,6,7,8,9,10);
$b=array(1,3,5,7,9);
$c=array(1,1,2,2,3,3);
$d=array_count_values($b);
$e=array_count_values($c);

foreach($a as $key)
echo '<table><tr><td>'.$key.'</table></tr></td>'

foreach($d as $key=>$value)
echo '<table><tr><td>'.$key.'<td>'.$value.'</table></tr></td>'

foreach($e as $key=>$value)
echo '<table><tr><td>'.$key.'<td>'.$value.'</table></tr></td>'.

View Replies !
PHP To Create PDF With Form Data?
Is it at all possible to create a PDF file using input that is entered from a form?  What I'm interested in doing is creating a detailed online application that the applicant fills out, then once submitted, a PDF is created of the application, where it is then sent to the hiring coordinator and the applicant has an opportunity to view/print their application via the same PDF. 

I know it sounds like a lot, but it's just a thought. Is this remotely workable? If so, where do I start? I'm creating such a form now, but i'm not sure the steps to take after this..

View Replies !
Create A Simple HTML Form That Has The Standard To:, CC:, BCC:, Comments: Etc
I need to create a simple HTML form that has the standard To:, CC:, BCC:, Comments: etc. - but I need for the form to have a drop down list of "Subjects". Depending on which subject the user selects, it should email a different email address for each one for the contact.

The email addresses should be hidden and only server side. Could someone point me to a sample form which has something like this? I've Googled it all over but can't find any examples.

View Replies !
Using Includes: Html Form Parse Data Inside 2nd Form.
i'm coming down the stretch, so to speak. i've got a lot of the separate things settled that i need for my main "date entry" form. due to the several data items which need to be collected by this form, i've decided to try using includes, which i've found isn't that tricky at all really.

however, one of my includes needs itself to parse it's own little form data to result in the final entry to be submitted in the "date entry" form. perhaps doing this particular bit as an "include" is NOT the best option? Code:

View Replies !
Data From Mysql In A 3 Columns Html Table
I'm trying to write a script that fetchs image codes from a mysql database to display them into a 3 columns html table. Code:

View Replies !
How Can Create A New Permanent Table And Fill It Up With Rows Form Existing Tables
I did a ’join’ between 5 tables and I would like to save the output into a new
permanent table.

View Replies !
How To Create A Form Which Submits Data To Itself?
how can i create a form which is when submitted calls itself

i mean what to write in action property of form element

View Replies !
Use Form Data To Create XML File?
I like to create a form in an HTML page that will use the data entered into it to display an XML file. Code:

View Replies !
Form Script - Create The Landing Page In Html With Tags
A form that people will enter their info, and when the submit it, they will land on a page that shows the info they submitted for them to double check that it is the correct info before they confirm the submission. I have an idea that I could create the landing page in html with tags like [firstname] and [address], and have the script replace those tags with the matching field data from the form. I just can't figure out HOW to do it.
Sorry if I'm rather incoherent. just spent a long night attempting to figure this out. I'm feeling very, VERY Dense, even with my very limited PHP knowledge.

View Replies !
How To Update My Html Data Table After Modifications/additions
I got a html data table with ten records, and i wish to update this table after any modifications/additions to it.  How do i do it.

View Replies !
Create A Form That Contains Multiple Lines For The Same Data
I need to create a form that contains multiple lines for the same
data....an array looks like the answer.

My form:

Date Name Title Phone
====================================
_____ ________ _________ ________

My first though was to have variables:

date, name, title, phone, date1, name1, title1, date1,
date2,name2,title2,phone2,date3,name3,title3,date3

etc so that I can have 10 "lines" for the user to enter this data into.
Some will enter 1 line, others all 10.

So far, my clunky methods work....however trying to decide how many
lines they have filled out led me to thinking "perhaps I should use an
array instead".

This data is submitted to a database (mysql on linux) and I am not sure
if even that will work.

My question is HOW can I build a form that contains 4 fields that could
be repeated across numerous lines....then put it all into a db for
retrieval later?

View Replies !
Create A Form That Validates At Least 1 Field Has Data?
How can i create a form that validates that at least 1 field has data?

for instance, right now i have that you have to at least search by "last name", but i want to be able to say that "you must enter data into at least one search criterion"

and have the form validate that at least one, doesnt matter which field...has data entered into the field... Code:

View Replies !
Create Entry From Database
i am hoping someone can help me solve this problem i have spent the las 5 days over. Code:

View Replies !
Create A Multiple Entry Forms
This is what I am trying to do but have no idea where to start (I'm more of a designer then a programmer): I need a form to open in a pop-up window with the following fields as mandatory:

1. Name
2. Company
3. Position
4. Email

On this form there will be a "continue" and "cancel" button.

Cancel - closes window.
Continue - Prompts new form on same pop-up window.

New form (2nd page after someone clicks on continue):

1. Please describe the business requirement.
2. software modification (optional)

On this form there will be a "submit another request" and "finish" button. Submit another request - Opens same page as New Form (2nd page) but will have new values.
Finish - Will submit form by EMAIL and redirect to thank you page.

I need the "submit another request" to create new form pages as many times as the user needs. Is this possible? I can't wrap my mind around this but I was told that I
need to use loops / hidden fields, etc .

View Replies !
Generate An Html Form, To Be Submitted For Insertion To A 3rd Table
1. display a form consisting of radio buttons and check boxes. multiple selection of check boxes per radio button basically.

I got this part done, it displays the data in the form which is being pulled from two separate tables.

2. Insert for each check box a record into a third table of the check box and radio button.

this is what i have thus far and I'm not really sure why it's not working from what i can see step by step it should be inserting the records, these arrays are the most terrible thing i can think of having to do. Code:

View Replies !
Lots Of Form Data Into A Sql Table
What is the best way to pass a fair amount of variables between pages or directly into a sql table without having to pass them between pages using $_POST[]? Basically here is my scenario: A simple app that allows a user to enter a dozen or so values into a form.

From there the form data is passed to a function page that inserts into a MySQL backend. Its really simple but this page will eventually have about 30 fields of data and specifying 30 fields of POST data such as $var1=$_POST['var1'];........$var30=$_POST['var30']; isnt clean coding or easy to manipulate.

What is the professional way to move this data between the pages? POST or register the data into a session var then retrieve on the functions.php page? Is there a better way to put all this form data into a backend such as send the data to the same page its on?

Could someone provide a code snippet or example of the best way to have form data entered right into a sql db? I am using a class that has about 20 vars in there a default constructor and a few class functions. would like to use a class object to hold this data and be used to pass around.

View Replies !
Using Html Form Data
I'm trying to send and receive data interactively to an html form and am having trouble processing the returned data. The idea is as follows:

- Retrieve records from a SQL DB and populate an array to send four of the fields from each record to an html table.

- As each row of the html table is built (using a loop) it includes a checkbox field (used temporarily, and not for return to the SQL DB) so the user can select one or more of the displayed records.

My problem is getting the record ids of the selected rows (checked boxes) back to my php processor so I can use the selections to populate a new array. I can't seem to grab and use any of the data from the checked rows. In the end, I need the record ID and road name fields for later use. Code:

View Replies !
Form Data Array - Need To Update Table
I have a form that is dynamically generated by the fields I have in a table. This table generates the navigation for my site, and I want to create a page that will allow me to reorder and hide/show and activate/deactivate the links. The form is working and I have the form generating an array based on the data collected on submit. I need to know how to break this data apart so I can update my site navigation table with the correct values. The table looks like this:

View Replies !
PHP Form Overwrites MySQL Table Data
I have a PHP form sending data to a MySQL table, and I am wondering if I can add some sort of code to the PHP page that will make the form data overwrite any potentially old data already in the table.

View Replies !
Inserting Dynamic Form Data Into A Db Table
I have a script to submit some values into my DB... the variable type is dynamic as shown below.... how can I get all types in an array in order to store them in one field afterwards? Code:

View Replies !
Retrieve Data Into Html Form
I want to retrieve fields from mysql table into html form to update those fields.

View Replies !
Using More Than One HTML Form Box To Insert Data
I want to be able to use multiple form boxes to insert data into one field in a mySQL database. Is their a PHP processor function or script that will do this?

View Replies !
Pass Data From One Html Form To Another
I've created a 2 page application form in html. Once the person has completed the first page and submits, I send an email with the form data using a php which then redirects to a second .html page. Once the second page has been filled out, and the person click submit, a second php is run and I receive a second email with the data from the second page.

I need to be able to pass the person's last name from the first page to the second in order to know who has filled out the second page. Is there a way to send data from one form to another through a php script?

View Replies !
Convert HTML Form Data To XML
I am working on a Google Map and have everything working the way I want. I just need a way to get data from a form to post into an XML file so I don't have to edit the XML everytime I want to update my list of locations for the map. Code:

View Replies !
Form To Add Other Data To The Same Table And Database After The Session Login
I have a session login that has an submit page to create an account.

I want to create another form to add other data to the same table and database after the session login. I want to use hidden fields based on the session data already in the database to asssit the user without re-entering the same data again.

can someone show me an example of 3 user entered text inputs and two existing input from the mysql database based on the session information. Code:

View Replies !
Data Form Problems, Html/quotes
I'm having an issue with submiting large blocks of data, plantext and HTML information.
What appears to be happening is that when the form is submitted I pass it to a preview page. When I do this I send the data to a hidden input field along with an output to preview the data. Here's where the problem lies, the input field is getting hung up when it encounters quotes. Here's an example

I'm trying to paste the following page into my editor.
http://www.mysql.com/doc/en/Fulltext_Search.html

I'm using this for test submission samples. Code:

View Replies !
Insert Data To The Database From An HTML Form
i want to insert data to the database from an HTML form but when i run the script it will insert NULL to the database. On that note i like to request for help from anyone. This is my code

<?php

include "connect.php"

$sql = "insert into TEST values(:name)";

// Parse SQL
$stmt = OCIParse($conn,$sql);

// Bind php variables to Oracle columns
OCIBindByName($stmt,"NAME",$name);
// Oracle converts all column names into UPPERCASE

// Run SQL
OCIExecute($stmt);

View Replies !
Sending Html Form Data To Mysql
I have no formal training with programming besides a few intro classes in college(6+ years ago).

1) I created a mysql db called "myphr" and a table called "form_data" with id,name and email as the elements in the table

2) I created a "form.html" web form to have some put in their name and email to submit to the data base: Code:

View Replies !
Generate HTML Pages From Form Data?
Does anyone know if it is possible to submit data inputted from an online form, insert the data into an SQL Database and create a html page using the data inputted automatically perhaps from a template page???

I have been able to complete the insertion of data into a database but the latter part, automatically creating html pages using the form data, is a part I am struggling with.

View Replies !
Populating An Html Form With Mysql Data.
What I have is a basic html form I have made consisting of header fields and fileds that will be populated from a mysql database. The brackets are the actual db fields and denote where I want the data to populate. Here is a small example of the form. Code:

View Replies !
Trouble Linking One Table Entry To Another
I very new to PHP but like what I'm getting into. I know this is a simple question with a simple answer, and I know I must be missing something easy.

I have a contact table, which naturally lists all of our clients. When they make a purchase, we update the order table and as part of that, we need to tie that order back to their client entry. When I try to pick up and enter the "clientID" in the order table, all I get is a zero(0). Everything else populates correctly. Below are the two scripts involved. The first is the display where the ClientID comes from, and yes, it gets passed over to the second, but does not make it to the SQL statement.

Any advice would be appreciated...Sorry for the messy code...

View Replies !

Copyright © 2005-08 www.BigResource.com, All rights reserved