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.





Insert/Add Row In HTML Form


I am trying to find out a way to have the user input as many rows as they desire, right now I only have a form where user can only input one row of data, I am wondering if there is a button lets say named "Add Row", after clicking it, the user can then add row into the database automatically? It might be vague, so let me describe it in a more concrete way. Lets say if I need user to enter a receiving report, the record includes date, sender, contents of shipment, qty.




View Complete Forum Thread with Replies

Related Forum Messages:
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 !
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 !
INSERT Html / WYSIWYG
I have been having trouble finding a solution to actually inserting html into a database and then showing it again fully formatted. Code:

View Replies !
How To Insert Tab In An Html Page???
i am making one appllication inwhich the user enters text in textarea field. i am saving this value in database and when user accesses value from database, i want to display text in a format entered by user.

i.e. if the user has entered some text in 2nd line then it should be displayed on second line and not after the end of first line in continuation. if user has entered tab in some location, the tab will be displayed while viewing data from database.

View Replies !
How To Insert $filename Into Html Tag?
i want to insert $filename into src=" " using echo;
but i don't know the right syntax to do this.

This was the codes below that unsuccessfully executed.

$filename = "myimage.gif";

echo "<img src=$filename />";

although there was no error but i don't see the image
i guess my insertion to variable inside a src=" " is wrong...
I hope you will help me with this very tiny insertion problem.

View Replies !
Insert JPG Created With Information From A DB In HTML
I look in my DB for a CODE. I find it and now I want to show the jpg
corresponding to this CODE in html. Here is my piece of code, however
the photo will not be shown.. Code:

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 !
Install PHP W/DreamweaverMX Or Just Insert PHP Code Into HTML?
I am brand new at PHP and Dreamweaver MX. We have Linux/appache. I need to create a form on the web/and communicate data to/from an MS Access DataBase. I saw a great tutorial ref in devshed.

If I have Dreamweaver MX, do I need to purchase PHP? Dreamweaver can process PHP code embedded into its HTML, I think but do I need "something" else? What version of PHP is MX using ? Are there other links that provide "PHP script/code" to use to connect to Access?

View Replies !
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 !
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 !
Insert Form
I have a form which Inserts data into my database. I wish to replicate the info in a table as the members will be able to alter and delete records. The second copy table is to hold a permanant record.

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 !
Use Html Form When I Print Value Of One Text Input Of The Form
i have problem with post method , i use html form when i print value of one text input of the form , it prints the value plus the name of the text input plus the = plus the value again.

View Replies !
Form/insert Problem
Below, is the code of a form to predict some matches. What I want is to submit this with with one button so it inserts the macthes in the database. One match is one record.
The problem is that I don't know what to do now. Code:

View Replies !
Insert Array From Form
I have been trying for a while to insert an array from a select menu into a table in MYSQL. I tried the serialize function but couldn't get that to work.

I have a file in the MYSQL table named type and I want the name of the type the user selects to go into that field.

My array part of the form looks like this:

<p>Please select a type of incident:
<select name="type[]" multiple>
<option value="disruptive" SELECTED>Disruptive</option>
<option value="accident">Accident</option>
<option value="other">Other</option>
</select>
</p>

The script right now is down to this, (I stripped the serialize function that didn't work):

// Make the array
$type = array('disruptive', 'accident', 'other');
foreach ($type as $key => $value)

//Add the type to the incidents table.
$query = "INSERT INTO incidents (type)
VALUES ('".mysql_escape_string($_POST['type'])."')";

View Replies !
Insert Form Informations
In my Form File

<form action="<?php echo $PHP_SELF; ?>" method="post"
Hare is a Validation class file included. It checks the fields validation.

Now How can I Insert form informations ?

____[I can insert from the PHP_SELF. But it's not secure.
____I want to use a "form_process.php" to Insert to db.
____But (1) I cannot use <form action="form_process.php"
____...........because its already used - <form action="<?php echo $PHP_SELF; ?>"
____......(2) I cannot pass veriables to another file.]

Now how can I use "form_process.php" with the existing Validation class File?

View Replies !
Insert Date From Form To Db
I have a form taht takes a date with 3 fields

mymonth,myday,myyear

How would I combine these to insert them to a mysql datetimefield -- waht's the correct way to combine them?

View Replies !
How Do I Auto Insert To Db Without A Form
I am trying to run a counter so when a person clicks on a banner, it updates the db with a new number.

I have called the banner link:   ad_counter.php?id=1
I have a field in my table called ad_counter

Then im setting a recordset to GET the data. I am using:

$last = $row_Recordset1['ad_counter'];
$add = 1;
$ad_counter = $last + $add;

What I want to do is auto form fill and update the database, and proceed to their website without this process even being seen.

Is this possible without having to push the form submit button. A basic statistics gatherer for businesses who wish to advertise.

View Replies !
Insert Form Data
I have a form page called "index.php" which contains data that should be inserted into a MYSQL DB. When the user hits the submit button I want the "index.php" page call a function located in another php file called "manage_advert.php". Code:

View Replies !
Insert Form Info Into Database
i am trying to enter info from a form into a mysql database. when i submit the form, a new row is created, but the information isn't contained in it? any thoughts? PHP Code:

View Replies !
Issue Insert ' Into Database From Form
I am unable to insert a ' through a form into my data base here where it is messing up i believe: PHP Code:

View Replies !
Insert Processes Before Form Is Submitted
I am trying to stop using Macromedia as my crutch and you guys have been a big help.  I need some assistance with submitting a form.  I have a form on my page and need to do an insert.  I have the action posting it back to the same page I am on versus sending it to an insert page.  The problem I am having is it trys to do the insert as soon as I pull up the page instead of waiting till the form is submitted.  I believe I need to do something with isset, but can't really find a tutorial that goes over it really well. Code:

View Replies !
Insert Data From A Form Into 2 Tables
I'm trying to insert data from a form into 2 tables, and I just can't find out whats the matter with this. The following is the insert function, which works fine inserting into the product table, just no information goes into the track table from the form. Code:

View Replies !
Insert Multiple Rows From One Form
I have one form submitting a dynamic amount of identical entries depending on how many are generated from the query for the specific date. Each form "set" consists of four values, qid#, a#, a#, a#. So for example, three sets of these equal forms will create the following values:

qid1, a1, a2, a3
qid2, a4, a5, a6
qid3, a7, a8, a9
....
etc

I would like to insert each of these "sets" of values as a new row in my table. Right now I'm using the following code and I'm having problems: Code:

View Replies !
Form - Take The Feilds And Insert Them Into The Database,
ok so the form i created has a few little things and then a file upload. what i need it to do is take the feilds and insert them into the database, except the upload feild. that just needs to be uploaded to the server then the PATH be stored in the database. im having 2 problems. 1 im getting this error Code:

View Replies !
MySQL - INSERT From 1 Form To 2 Tables
I am a student 11 weeks into a PHP/MySQL college class. The following week is spring break (no teacher) and I am working on my 'final project'.

I'm dealing with a registration form and inserting the data into two tables (customer info into one table, userid and password into another).

Currently, in my script I can insert data from the form in either table, but not in both tables. Code:

View Replies !
Insert Form Data To 2 Tables
I'm trying to INSERT data into 2 tables with one form submit, but only one table will insert. I've read all the postings on how to do it but I can't get my code to work. The data for the second table, 'quess', inserts okay, but the problem is NO data for the first table, 'users', is inserted. I'm not getting any errors. In the table 'users' an auto-increment number is supposed to be generated for ID which is then used as the ID for the 'quess' table using '$LAST_INSERT_ID'. Here's my code.

<?php
include ('connect.php');

if ($Submit == "Submit")
{$sql = "INSERT INTO users SET
date=current_timestamp(),
firstname='$firstname',
middlename='$middlename',
lastname='$lastname',
company='$company',
email='$email'
..............

View Replies !
Saving A File With A Form Insert
I have a form that I use to insert info about items into a database. One of the fields is the item's image. I have a field of type 'File" where I can browse to the location of the image and select it. When I submit the form, it only gets the file-name part, not the path. I realize that the path on the local machine means nothing to the script running on the server. How can I modify the form or the script so that once the user selects a file name, I can copy it to a location on the server so the script can access it later?

View Replies !
Insert Specific Date From Form
As part of my site I have a small jobs database. It's pretty simple with only a fwe fields: id, company, jobtitle, jobdesc, contact, closingdate, dateadded.

At the moment it all works fine, with 'dateadded' being populated by the inimitable now() function What I need to do though is find some way of converting the closingdate to the same kind of format. Code:

View Replies !
Really Simple Form Insert Into Mysql Db
I am trying to use this PHP form to mysql script that I have found on the internet.
Here is my form: Code:

View Replies !
Insert Data Into An Array, From A Form?
How do I insert data into an array, from a form?

View Replies !
Anti Robot Insert Form
I am trying to make a form that will allow users to to insert information into a guestbook, the problem i have is that a webbot keeps putting advertisments on it, how would I make one of those forms that allow you to enter in the value seen in a dodgy picture to validate that it is a proper person.

View Replies !
Insert Data From A Form Into A Database
I am try to insert data from a form into a database. I am not sure of which code i would use for Inserting the data that is sent from the from. a sample script i found for inserting into a DB is this:

mysql_select_db($mysql);
$query = "INSERT INTO user (host, user, password, select_priv, insert_priv, update_ priv) VALUES ('localhost', 'phpcake', PASSWORD('mypass'), 'Y', 'Y', 'Y')";

mysql_query($query) or die('Error, insert query failed');

$query = "FLUSH PRIVILEGES";
mysql_query($query) or die('Error, insert query failed');

example names from form boxes are "title , date , service"

View Replies !
Form To Insert Mysql Row *and* POST Data
I'm reasonably new to PHP and after searching all over the place can't find anything useful

I need to insert some variables into a mysql row and then POST variables to another web page using the same form

The page i'm posting to is an SSL (bank hosted)ecommerce transaction page which I have no powers to change

I don't have any problems inserting just mysql rows or making html forms to post separately, I just don't know where to start to get the one form to do both.

View Replies !
Use A Form To Insert Data Into A MySQL Database
When you use a form to insert data into a MySQL database, how can you
set it up so that the fields are not sent via the address bar.

For example:

page1.php
___________
<form action="page2.php">
<input type="text" value="whatever">
<input type="submit" value="Send">

page2.php
___________
// Inserts variable $whatever into database.

The problem that I have is that I don't want the address bar to appear
as http://web/page2.php?whatever=cheese but as http://web/page2.php

View Replies !
Insert Data From Form To MySQL Database
I have run createTable.php and everything is created. Now I want to run insertData.php. I want the user to enter stuff in the form & everything must be fill in before they click the submit button. It will call submitData() & all the information was enter will insert into the database. PHP Code:

View Replies !
Insert Information From A Form Into A Mysql Table.
I am using PHP and trying to insert information from a form into a mysql table. I want to take the address, city, state, zip, country and insert all that info into my table in one row called other1. Is there a way to combine all the values from the form and insert it into one table row?

View Replies !
How To Open Pdf Form Inside Php And Insert Data.
I got a pdf file which is a blank document, i wish to use this pdf form and insert some data and than save this form as something else.

My pdf form has got some titles i.e,

Name                    Date
I wish to insert data from my table under the relevant title and than save this form as something else.

Reading                 Issuing Signature

Address:

Can someone advise how to achieve this functionality.

View Replies !
Developed A Multipage Form That Carries Out An Insert
I have developed a multipage form that carries out an insert but im stuck on how to incorporate the same approach for updating the record. At the top of each of my forms at present is: Code:

View Replies !
Multiple Images Insert Into Database With One Form
I was wondering if there is a way with PHP to make it so that multiple images links named test01.gif, test02.gif test03.gif etc, can be placed into the database without having to do them each seperately and without a loop.

View Replies !
Form Validation - Insert Malicious Data?
In terms of security...

Do checkbox values need to be validated?

For example, if my script processes:

<input type="checkbox" name="checkbox1" value="checkbox1">
<input type="checkbox" name="checkbox2" value="checkbox2">

Would a user be able to change the "name=checkbox1" or "value=checkbox1" to insert malicious data?

Also, if a textarea box within the same form is only used to display echoed data from the script, does this need to be validated as well?

View Replies !
Insert Data Collected On A Form Into Two Tables Into My Database
I'm trying to insert data collected on a form into two tables into my database. I know the SQL statements work because I tested them individually, but I keep getting the error "Couldn't execute query 2". Code:

View Replies !
Check Form For Required Details Before Mysql Insert
I'm making a script that will let the users of my site enter information into a form and then submit it to a database. I've created the database and set up an sql user account that's only allowed to insert to a specific table so that's all ok. The thing i'm having trouble with, is checking the required forms have been filled in. I don't need to do any reqular expression matches on any of the inputs, i just need to let the user know when they've missed out a required field and to stop the script if they haven't.

I know this could have tons of different methods, i'm after something basic that will give me an idea how to do it as a beginner.

Are there any turtorials or guides on the net that will give me the information i need? Oh, i'm aware the sql part of the code isn't complete. Please remember i'm somewhat of a php noob so go easy. Code:

View Replies !
Form Data Dynamic With Checkbox- Need To Insert ALL Selections Into DB
I have a form that I am generating line items with checkboxes dynamically from a Database. When someone checks more than one box, only the last one is recorded to my database history. I need to record ALL selections made by the check boxes. Code:

View Replies !
FORM-add Submit Button For Insert Records To Database-HOW TO DO THIS?
First file post.php take record and send it to post2.php. Now records are insert into databse without submit button press and that is my problem.

I need working submit button. When user click on submit button=insert data to database. Sorry for my english. Code:

View Replies !
Base64 Encoding - Insert An Attachment To An Email Form.
I'm working on a small script to insert an attachment and an inline image to an email form. Everything works fine except for the fact that the attachments are corrupt. I'm sure this isn't just me. here's the setup:

RH8
php-4.2.2-8.0.5

using the following code

$data = chunk_split(base64_encode($data));

View Replies !
Multi Page Form Question Concerning $id = Mysql Insert Id();
I am creating a multi page form. The code below is what I am using. However, I am having a difficult time having it post to MySQL under "pg2" where it posts to MySQL I have the function $id = mysql_insert_id(); to post the id from "pg1" post to the database. However it only post 0 which I think is due to it being in an array. Code:

View Replies !
Insert/Remove Portion Of Query Depending On Form Field
I have a form that updates an employee's information including a password for that employee. The form has a password field and what I would like is if the admin leaves that field empty, the users password remains unchanged in the database... but if the admin enters text into the password field then that text should update the database as the employees new password.

The problem is to do this I need to either insert or remove a portion of the sql query. (There's probably an easier way to do this that I'm not seeing at 5:30AM.) But I don't know how to store the query portion outside of the actual query and then insert it when needed.

So let's say this is the basic query. This is what I want if the password FORM field is EMPTY: ....

View Replies !
Insert Html / Pdf Into "image" Column In MSSQL 2000
I am trying to insert uploaded files into a M$ SQL 2000 database. The uploaded files are validated as either PDF or HTML and then passed to the database. They need to be stored in an image column so that they can be indexed for fulltext searching.

Currently I get the following error when inserting the files into the db -

"Operand type clash: text is incompatible with image"

The files are read into a buffer and then they are prepared for the insert. I have tried both addslashes() and replacing a "'" (single quote) with "''" (two single quotes). I have seen suggestions that the data should be base64encode()'ed but can't get anything to work consistantly.

View Replies !
OT? Php Form And Html
Sorry to ask an old question, but I cant seem to get this simple php
to work. Ive looked at old postings and for whatever reason cant seem
to
get this to work. Any help is greatly appreciated. Im new to PHP.

My PHP works just fine (apparently), but doesnt work the way I want it
to.

All I want to do is accept a login and password and then send it off to
a perl script on 'submit'. It never appears to get into my 'if'
section,
any suggestions? I cant seem to get the following to work:

<html>
<body>

<?php

if (isset($_POST['Submit']) && ($_POST['login'] == 'login'))
{
print "Login: $login
";
print "Pass: $pass
";
$file = popen("/home/http/website/cgi-bin/gs_do_search.pl $login
$pass","r");
while ($line = fgets($file,1024)) {
// display it now
}
}
?>

<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">

Login: <input type="text" name="login"><br>
Password: <input type="password" name="pass"><br>
<br>
<input type="Submit" name="Submit" value="login">
</form>

</body>
</html>

View Replies !
PHP XML XSL HTML Form
I am working on a generic (php) script to produce (X)HTML Forms through XML
and XSL based on field-definitions stored in a database.

The basic way i did HTML-forms in PHP was like this:
http://212.204.203.71/test/simpleform/simpleform.php

source: http://212.204.203.71/test/syntax/simpleform.php

This basic form is validated when it is submitted to itself... if validation
fails then an error message is created and displayed on the page...otherwise
validation is ok and we can do some inserting in the database and/or
redirect to another page. Remark: the fields that are filled will be
automaically filled in if the page is submitted to itself (that will be my
problem in the XML/XSL version of this script).

Now we go over to the XML/XSL version of the script above: I therefore
created an XML file (holding the field definitions) see:
http://212.204.203.71/test/xmlform/form.xml

And further i created an XSL file to transform the XML file into a HTML
form. see: http://212.204.203.71/test/xmlform/form.xsl

Then i used a file form.php to put the XML and XSL together using some PHP
xslt functions: http://212.204.203.71/test/xmlform/form.php

source: http://212.204.203.71/test/syntax/form.php

This all works fine but now the problem. I am looking for a concept of how
to get the formfields filled in again after submitting the form because in
XSL this is not as easy as with my basic form. I tried to send firstname and
lastname as parameters in the function call and to put them as parameters in
the xsl file but that does not work and it is not ok at all because my
intention was to build a generic script....

Hope you see my problem as it is hard to explain.

View Replies !
Form HTML
I'd like to know the best way for using the same HTML form, with minor differences, in different parts of a script without having to actually have two instances of it in the script.

View Replies !

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