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 Complete Forum Thread with Replies
Sponsored Links:
Related Messages:
Get Auto Number On Insert
i need to implement it in PHP so im posting this here. i have a table that auto numbers each row, and i need to get the primary key of each now row as it is added for further use.... for example: PHP Code:
View Replies !
View Related
Insert And Auto Incrementing Primary Keys
I am using MySQL and PHP. What I am trying to do is use a form to start a new record in a db. I am using an auto_incrementing field as my primary key. Right after I insert the record I want to get the value of the primary key so I can display a second form that will ask for more information. Is there a way to determine what the auto_incrementing field was set to after doing an insert?
View Replies !
View Related
PHP/mySQL Insert Into Statement With Auto Increment
When i use mysql from the linux command line it is just plain simple to add an row into a table, even with php this isn't a problem. But when the table has aan field with auto_increment php won't allow to insert a new row in the table. I'll get an invalid query back.. In don't understand how to insert a new row into a table with the auto increment. Btw this is also the primary key: Code:
View Replies !
View Related
Multiple Table Insert - Auto Increment Value
I have a table that when you add a new department it will add the name to the table and assign the row and id based on an auto_increment column. From there you need to get the value of the last insert id. SO what I did was use the msql_insert_is() function. and assigned it to a variable. I then used that variable in my next query because this vaule is a forigen key in another table. Here is my code it should be exectued if you where to post this page with the value of $department_id = "" then the section of script in question will execture. Essentially need it to grab this id number and then place it into 2 more insert statements that should execute immediately after the first insert statement. Then only insert id that I would need is the one produced in the first insert statement what an auto increment value is assigned to the same table as the department_name Code:
View Replies !
View Related
Auto Submit A Form In PHP
Does anybody know how to auto-submit a form in PHP without Javascript? For instance, submit form variables to self, validate the data in PHP on same page, then, if no errors, auto-submit the data via post rather than URL. Could serialize a few fields to URL, but there is a larger comments field that I think needs to be posted instead. Auto-post the form variables possible?
View Replies !
View Related
Auto Fill Form
I need to fill a form that is on another website that I don't have any control over. Basically there are two fields on that other website. First name and lastname. Is there anyway I can auto fill that from my site? I know We can submit forms on another site using CURL. But I would like to know if i can fill the form fields on another site.
View Replies !
View Related
Auto Posting Form
i need something very similar to craigslist type of posting. The user clicks "Post Here", fills out a form (Name, email, location of sale, 1-5(10) pictures),clicks "Post", and a link with one image will appear on the frontpage as well as a separate new page for the post. We do have SQL database. No, we are not creating a craigslist like site, but we are joining with our local newspaper, and we want people who read the newspaper, to be able to post their items and location of yardsales. If somebody could help me out with either the code itself, or point me in the right dorection as to where I would be able to learn that. I have basic HTML knowledge, and able to use MS Frontpage or Macromedia Dreamweaver.
View Replies !
View Related
Auto Fill A Form
I seen a website doing this but not in php so Im wondering if it is possible to open up a page like http://mail.yahoo.com and fill in my username and password with a php script? if possible how can i do this?
View Replies !
View Related
Auto Submit Form
i have a travel site and would like to link air timetable from different airports. To know a real information a need to submit a form in their site, but one site build on aspx.
View Replies !
View Related
How To Auto Redirect A Form
I have a form that passes a value(ex. amount/price, name) to a php processing script, which is a different page like action=formprocess1.php. Now my problem is I want to redirect my fields to another processing page (example action=formprocess2.asp) without the user clicking the submit button again and without the user knowing it. So from form1.php to formprocess1.php to formprocess2.php without the user clicking the submit button in formprocess1.php. You might have gotten with this trouble before where you want two action to process your form fields but there is only one action you can declare to the form. Is there a way to this? if you may wonder. i have a created a form that submits to a processing page, that shoots email and my client has its own credit card processing which resides in a different domain and i want to send the fields that i have extracted from my form to that credit card processing domain which resides in another server.
View Replies !
View Related
Auto-generating Rows On A Form
I need to create a form where people enter in information about pieces of equipment that they would like to sell, the only issue is that I never know how many they need to enter. I could just do a initial "How many... " form and create the next form from there, but I was thinking of something else. would like to know if this is possible(pretty sure ive seen it, just dont know how to do it): Start the form with just one row. As soon as they start entering information in that row, another row pops up below. When they enter info into that row, it creates another row... and so on.
View Replies !
View Related
Auto-generating Form Value Permutations..
I'd like to create a script that runs through a form, and autogenerates every single permutation for every single value, as well as option. The task is because I am currently working on a webservice project where I am feeding in nightly a set of values from an external data source, and populating my form with those values. In the end, I end up...
View Replies !
View Related
Auto Create Form Fields
is there a way in php to look up a mysql table and use the column headings as form field variables … meaning with this php program the entire table columns are displayed as form fields in the browser ? No need then to build the form by hand … in this consequence there could be a input type column and a width column which could be used to also automatically create the right types of fields for that particular mysql table …
View Replies !
View Related
Mysql Auto Form Building?
Using Mysql 4 and Php 5 also working in OOP using classes and functions Project is to allow admin to create new tables in the database through a browser. For example - 3 content sections sport, travel, news. In the admin area I want them to be able to create a table say "business". Each table has different field names some will be enums, text and varchars etc. I would appreciate some advice or pointers in the right direction for this. Here is what I think I need to do - Build a simple function that reads all the field names of a table into an array ready to generate the form.
View Replies !
View Related
Auto Populating Form Fields
I know this isn't a PHP thing. But, I've been unsuccessfully looking for how to populate form fields with data found in other fields. For example, I would like to populate shipping information with the billing information - if they are the same. This would save the time from entering the same address twice. Does anyone know of a javascript site that is decent at these options?
View Replies !
View Related
Auto-place Cursor In Form Box
I have users with profiles on my site, and I'm working on allowing users to send private messages. In a user's profile, there is a link for sending a message. The link reloads the profile with a form box for typing in the message. Does anyone know how I make the page center (or at least scroll so that the box is in the viewable window) and place the cursor inside in the form? I basically want to do the same thing as www.google.com in that the cursor is automatically in the search box when you open the page.
View Replies !
View Related
Form Auto Select Option
I have a website that has a contact form with a dropdown list of names. I would like to code it so that when a user selects a person's name from another page, that when it brings them to the contact form, that name is automatically selected in the dropdown list.
View Replies !
View Related
Auto Fill And Submit Form
Can i fill a form and submit it automatically using PHP? or Suppose a PHP script uses the 'Get' to get variables, I suppose i can directly specify a value to that variable as url/abc.php?fieldname=value What if it uses 'Post' ?
View Replies !
View Related
Auto Submitting Form Problem
When the user selects the value from the list I want it to refresh automatically, as if the user has pressed submit. I have named the form 'test' and added onchange="test.submit();" to the Select field. as so: <select size="1" name="search" onchange="frmtest.submit();">
View Replies !
View Related
Auto Fill Form Inputs
I have the drop down menu that list the person's name from the MySQL query. Next to the drop down menu I have 3 text boxes...user's name, user's sex, user's age. I want 3 text boxes to display the information that is already in the Database when I choose the user I want to see. I have the DB table that houses users information already with the information already entered. Once I click user 2 I want that user 2's name, sex, & age to be displayed in those 3 text boxes that I already have. Then if I choose user 10 I want user 10's information to populate in those 3 text boxes.
View Replies !
View Related
HTML Variable In Auto Response Form
This formmail works. Auto responds fine. When I change the $my_message variable, from what is listed, to HTML code, it cancels out the latter PHP code(which is the autoresponder). The HTML code I insert into the $my_message variable, includes Javascript functions, which I assume are causing problems with the PHP, because when I remove the JS function, the "color code" in my editor, looks normal, with the latter PHP coding back in place, but it still doesn't work. Basically, I'm just trying to figure out how to autorespond an HTML email instead of just Text. Code:
View Replies !
View Related
Auto Submit Form On Page Load
i have a cronjob to run a php file at a certain time of the day. it originally was suppose to run the php mail function, easy enough, right?? but no, the php mail function is not enabled on the server - just my luck. all i need to do is send two values from a database table within an email. i was thinking, i could probably create a form which plugs the two values into fields, and use the mail cgi file to send it that way, but I'd need to submit the form on page load (without someone actually clicking the submit button). I could use javascript, but the cronjob would ignore the javascript. any ideas?
View Replies !
View Related
Auto Fill 2nd Form Field From 1st Info
I want to be able to auto fill the description of an item based on the part number. I know I can do this but have to reload the page each time. Not a problem except I am not sure how to do this without submitting the form, however when I submit the form I want to go to a confirm page. Code:
View Replies !
View Related
Replacing GET With POST And Auto-filling Form Fields
I've got the following page that is used to retrieve entries from a database and put the values in their respective fields for the user to then edit and UPDATE on the database. It's working but first I have to press Submit, then when that page loads I have to click Edit. Is there a way to avoid this extra step of having to select Edit on the followup page? Code:
View Replies !
View Related
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 !
View Related
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 !
View Related
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 !
View Related
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 !
View Related
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 !
View Related
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 Replies !
View Related
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 !
View Related
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 !
View Related
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 !
View Related
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 !
View Related
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 !
View Related
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 !
View Related
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 !
View Related
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 !
View Related
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 !
View Related
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 !
View Related
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 !
View Related
|