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.





Form Submit - Adds A Delete Button To A Form


I have a line that adds a delete button to a form and I have an onClick procedure that confirms if the user wants to delete an article, how can I use PHP to code a statement so if they click OK it deletes the article from the database? Or have it link to a page like events.php?do=delete or call a function? Or do I absolutely have to use javascript?

Here's my code:

PHP Code:

$delbutton = '<input type="submit" value="Delete" name="delete"%s>'
            $jsconfirm = ' onclick="return confirm('' . $LANG01[39] . '');"'

sprintf ($delbutton, $jsconfirm);




View Complete Forum Thread with Replies

Related Forum Messages:
Difference Between A Person Clicking The Submit Button In A Form Or Hitting The Enter Key To Submit The Form?
Is there a difference between a person clicking the submit button in a form or hitting the enter key to submit the form?

I have a form that gives a blank page when someone doesn't fill out the form and presses the enter key, but gives you an error code and redisplays the form if you click the submit button with your mouse.

View Replies !
Submit Button - How To Submit One Form And Then The Form Data Goes To Other Sites
I'm trying to find a way how to submit one form and then the form data goes to other sites. Here is an Example below! I got Sites (Main),(A),(B)&(C) I want to fill in the form on site (main) and it sends to sites (A) (B) and (C).

View Replies !
Upload File Having Browse Button And Submit Button On Same Form
I am building a form where the user must upload a picture and fill in his
details.
Now I have a problem as all of this is on the same form.

How will I be able to have the Browse button to open the "file browse"
dialog
and the Submit button to submit the form data.

As I believe you can not use GET but must use POST method for form.
Is there any means that I can use GET cause I need to get form variables
from URL as well.

View Replies !
Submit Form Without Clicking Submit Button
I was wondering if it is possible to use something like Javascript to make it so you don't have to click the submit button on a form to make it submit, while using php and mysql. e.g. Code:

View Replies !
Form Submit Button
Should be a quickie but I just can't get it to work.

I have a form where my users can submit their football picks, when they
click submit I would like another sized window to appear (mnf_scores.htm)
where they can submit a total score for the Monday night football game each
week. From the research I've done I think I need the following:

// If this is change picks, output the submit button and close the form
if ($userfunc==1) {
echo "<p><input type="submit" value="Submit Your Picks!"
onclick="window.open('mnf_scores.htm','MNF Scores')"/></p>
</form>
";
}

But that just doesn't seem to work. The submit part works but the subsequent
window is not opened.

View Replies !
2 Submit Button In A Form
2 buttons - update and delete as submit button. I cant use the $_POST or $_GET METHOD as it cant use.

Before the form is submited, it is required for fields validation. validation will be done by the client side. How can i skip doing with the POST and GET method.

View Replies !
Submit Form Without Button?
Does anyone know if it is possible in php to submit a form without a user having to actually click on a button?

View Replies !
Submit A Form With No Button?
I would like to submit a form with only 2 radio buttons: On / Off

Is there a way to submit the form when I click one of the radio buttons, and not a submit button?

View Replies !
Submit Form Button
i don't really know what i'm doing, so i'm sure i'm going to get railed on this. but after searching for help in FAQ's and tutorials i still feel like i'm in the dark.
i have a simple form set up, but i'm lost on how to get the submit form button to work. Code:

View Replies !
How To Submit A Form Without A Button
how i can submit a form without using a submit button, i have to use this in one of my ongoing project.

View Replies !
A Preview And Submit Button On Same Form
I have two buttons on the same form, much like here when you post a new thread, you have the option to preview. Using isset is not working for me, PHP Code:

View Replies !
Form Submit Button Question
For a web page, I want a SUBMIT button that commits the form data and a
CANCEL button that goes to a different target (i.e. a different script).

I haven't figured out how to do this, because the <FORM ACTION="... tag
seems to make sure that any two submit controls in a form have to go to the
same target.

BTW, the CANCEL button does not have to submit any form data.

View Replies !
Posting From A Form Without A Submit Button - How?
Given something like:

if ( $_POST['type_save'] == 'Save record to HTGI public DB') {
echo '<form method="post" action="populate08.php">'
echo '<input type=hidden name="kw_tarea" value='.$tk.'>'
echo '</form>'
echo '<p>permanent DB updated'
}

But there's no button to press for a submit. So how do I get this code
posted to the action=populate08 ? Without pressing a buttom but just
from the code?

View Replies !
Form Posting Value Of Submit Button
My code here is posting the value of the submit button instead of the option value. I'm not sure what the problem is. Code:

View Replies !
IFRAME Button(submit) In A Form
I have a php file in a IFRAME and there I have a button(submit) in a form, and I have a php file that are not a part of the IFRAME. The file that doesn't contain the IFRAME have a if structur like this. if(isset($_POST['pushed'])){ }

View Replies !
Submit A Form Without The Submit Button
Is there a way to submit a form without the submit button?  Do I have to use the javascript - document.formname.submit();

View Replies !
How To Submit A Form Without A Submit Button
how i can submit a form without using a submit button, i have to use this in one of my ongoing project.

View Replies !
Submit A Form But Without A Submit Button
I want to submit a form but without a submit button. That's to say, I want that by giving a definite code in a field and then press <ENTER> the form will be submitted.
For Example

<form name="search_form" method="post" action="search.php">
.....
....
Code: <input type="text" name="code" onKeyPress="if (event.keyCode ==
13) {document.search_form.submit()};">

....
....

How can I do it without a submit button?

View Replies !
Process Form Only After Submit Button Pressed
I have an "update personal info" page which includes a form and the corresponding query on the same page (using PHPSELF in the form action). It would be great to run the code and see a success message only AFTER the submit button is pressed. Would this work: PHP Code:

View Replies !
Customising The Submit Button For A Contact Form
I just cant seem to change the submit button of my contact form from the default button to an image I created. I have tried changing <input type="submit" to image, that changes the button to the image I want but then when you click on it, the form fails and the error message comes up. 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 !
Submit Button - Correct String For Form Action
I have a registration page I just cannot make work. I cannot find the correct string for form action, the server information or the database information.

I cannot even figure out what it is I am looking for - in other words what would the string look like- I tried asking my hosting company because if I put in their server name the database comes back and says "Access Denied" but I get absolutely no answers from them.

View Replies !
Testing For Form Submissions (via A Submit Button) In Forms That Need To Be Reloaded
(I'll preface this by saying I did search around, at length, and couldn't really find any posts that exactly describe this situation. It's not particularly easy to search for, either, because the terms are so common.)

Here's a fun one. I have an HTML form, nothing fancy, with a drop-down ( <select> ) menu, a few fields, and a Submit button. When the user makes a selection from the menu, I need to reload the page to trigger some dynamic changes in the HTML that create the fields below, which are based on the user's menu selection. To reload the page, I have simply attached an onchange="document.form.submit()" behavior to the <select> element of the menu.

The problem I'm having is that the entire form contents are being submitted (obviously) when the user changes the menu. That's fine, but I need a clever way to determine whether the form was submitted because the user changed the menu, or because the user intentionally pressed the Submit button.

View Replies !
Form Processor To Redirect To A Specific Page Based On The Selection Of A Radio Button On The Form.
I need to have a form processor to redirect to a specific page based on the selection of a radio button on the form.

It would be like this:

If selection is button "A" then goto A URL
If selection is button "B" then goto B URL
If selection is button "C" then goto C URL

I don't know how to code in php or when I would put such a statement.

View Replies !
Pass Form Variables To Second Page And Re-submit Form
This is probably a mixture of PHP and javascript required, but i'm trying to pass form variables entered in page1.php to pass to page2.php and the form to re-submit from page2.php with the values entered in page1.php.

Is this possible, and how would i go about it?

View Replies !
FORM MAIL - Browsers Are Able To Go Back And Re-submit The Form AGAIN
I've coded a normal feedback form and it works perfect. BUT the problem is that the browsers are able to go back and re-submit the form AGAIN n AGAIN.....

The form is not obviously not cleared whn they hit the back button and they are able to post the feedback form(mail) continusly..

View Replies !
Form Within A Form And When I Submit One Of The Forms It Freezes The Browser.
I have a form within a form and when I submit one of the forms it freezes the browser. Can I change the below code to submit to make sure that it only submit the form numItems

<form name="numItems" method="post" action="<?php $_SERVER['PHP_SELF']; ?>"> 
<select name="numItems" id="numItems" onchange="this.form.submit()">

View Replies !
Click SUBMIT In Order To Submit The Form Instead Of Hitting ENTER.
created a form but when i fill out the form and hit enter it just refreshes the php (php). i have to actually click SUBMIT in order to submit the form instead of hitting ENTER.

View Replies !
Update Form Throws "Undefined Index" Error For Unchecked Radio Button Fields On Form
I have display error ON and error reporting to E_ALL.

I have a form that opens fine. When you submit it, all the fields that have
nothing in them, for example an un-selected radio button, throw the error
similar to that below.

Notice: Undefined index: fld_ONECHOICE in /usr/..../updateFORMFACT.php on
line 29

These fields are not required for the form to be completed.

Do I HAVE to default all fields to yes/no or some entry? Surely not.

Is this just something that shows with error reporting set to E_ALL and I
shouldn't worry about it?

View Replies !
FORM SUBMIT PROBLEM - Get The Email To Submit On The Same Page
I would like my form to submit via email on the same page, once the form is submited it will then load the next page yourquote.php

I cant however get the email to submit on the same page, it switches almost striaght away to (yourquote.php) and sends the email from that page, i have a loader gif which is meant to load on the form page when submit is clicked which should disapear when the email is submitted only then should it change page.


View Replies !
Click Button And Adds To Text Area - Like SMF Bbcode
How can I make buttons to add some things to a text area, like the bbcode for SMF?

View Replies !
Submit Form Does Not Submit And There Is No Change To The Database
I have this code and when i put the amount of tickets you buy and hit Return it does not submit and there is no change to the database, yet when you hit the submit button it works. Code:

View Replies !
Passing Radio Button Values To A Submit Button (gif)
How do i pass the value of the radio button to be put of the action
that includes the value as part of the URL being submitted - "/
picked.php?pick_num=". Any help with be appreciated. Thanks

<form method="post" action="/picked.php?pick_num=".<php? $value ?
<input type="hidden" name="cmd" value="0">

<table width="100%">
<td align="center">
<INPUT TYPE='RADIO' NAME='pick_1' VALUE=&#391;'>Day;
<INPUT TYPE='RADIO' NAME='pick_2' VALUE=&#392;'>Week;
</td>
</tr>
<tr>
<td align="center"><input type="img src="/images/pick_now.gif"
BORDER="0" name="send"></td>
</tr>
</table>

View Replies !
Form Submit
The program I'm working on is a web-based CMS (content management system). There is a large editing form where users can add/update/alter content. Several parts of the editing process however require the user to navigate away from the page. The problem is that any changes made to the main form are discarded when navigating away (something I sort of forsaw but just never got around fixing early on - bad idea). To give you a better idea:

There is the main editing form called edit_buildings.php On it there are several text fields. The form is submited to a page called edit_submit.php which does all the processing and also outputs a log of changes made, to make sure everything went through ok.

However, on the edit_buildings.php page, there are links to other pages like edit_rooms.php and edit_features.php (I'm sure you can get an idea of how this works).

Is there ANY (easy) way of having the links to edit_rooms.php and edit_features.php get the form submimted and processed by edit_submit.php and then redirected to the originally intended destination (edit_rooms.php, edit_features.php) ?

View Replies !
PHP Form Self Submit ?
I'm try to figure out how to submit the Form Variable to Multiple Address. The basic form action is only post to single address like this, <form method= post action="abc.php">

If I want to post the same variable to more than one address when I click the submit button, like posting to folowing address:

1) abc.php
2) discuss.php
3) log.php
4) data.php
5) 123.php

Did your have any idea how does it work in php? Did anyone can tell me where can I find the tutorial teaching on this method or did your have any code sample that can share with me for reference.

View Replies !
Php Submit Form
what I am trying to do is make form so I can put my password in and then it sends it to my email from wherever I am. This what I have so far. For some reason I cant make it work Code:

View Replies !
PHP Form Submit
I'm really new to PHP but I need a form submit on my website. When using the form everything seems to work, but I am not receiving the data from my form. I used a program that I found to make the form and was hoping that it would just work.

View Replies !
Self Submit A FORM
I have a form full of hidden variables that needs to be submitted to a remote server... Can I some how self submit the form using PHP rather then JS? i.e.

<form name=myform method=post action=someothersite.pl>
<input type=hidden name=test value=variable>
</form>

How can I submit this to sometohersite.pl (the action address) via PHP?

View Replies !
Self Submit Form
I would like to know if there are any tutorials that show you how to create a self submitting form with error checking. The error checking and message appears above the formwhen the field has been missed out. If all is ok the form get mailed, which I can do.

View Replies !
Submit By PDF Form
I created a PDF file and put a form in it , i wanna let somebody to fill the form and submit the data to my web sever with PHP-enable , but I don't know which is the data's type that submited by PDF file, and I wanna know the PHP-code that recieve the data from PDF's submitting...

View Replies !
Submit Form
I have just created a submit form which includes attachments. I got a script off HiQFM which handles attachments. I got it all working apart from the attachments. If I try to attach a document on the form, it isn't sent but when no attachment is attached on the form, I receive the information perfectly.

<form target="_blank" id="form2" enctype="multipart/form-data" action="/formmail/HiQFM.php" onsubmit="return validate();" method="post">

<li class="attach"><label for="attach">Attach:</label> <input type="file" name="attach"/></li>

<input type="submit" value="Submit to Exigo translations" />

</form>

Any help would be really appreciated as I am completely stuck as to why attachments aren't sent.

View Replies !
Form Submit With Id
I have a form which adds data to my table (add.php), I want the same form to be used when editing/updating table data. add.php -> add data add.php?id=200 -> edit data where ID is 200 The problem is, if there is NO '?id=' in the URL then the scripts to add data is called. If there IS 'id?=' in the URL then the scripts to UPDATE data is called. But on submitting the form (to itself -> add.php) the '?id=' gets lost and my script will automaticly use the ADD script.

View Replies !
Form Won't Submit
I wrote a PHP script that produces a form. If the form is submitted, the
entered information is checked. If an error in the input is found, a
message appears. Using the browser's 'back' button, the user can change
his/her input. If no errors are found, the input is used to generate some
graphics (using the gdlib.so module). Code:

View Replies !
Form Submit?
I can't seem to figure our why this doesn't work. I don't get any errors, it just doesn't submit. Code:

View Replies !
Log In And Submit A Form?
I am trying to build the following:

A script that logs in on another page (to get the session id
or a cookie) and submits a form within the page.

I tried the PEAR packs HTTP_request and HTTP_client,
but I don't get it to work.

And no, I do not want to spam or do something illegal with
it. I just want to create subdomains. My provider does
not support another way.

View Replies !
Self Submit Form ?
I wrote an example of using self submit form like this, however it doesn't work: Code:

View Replies !
DB ONE Submit Form
PHP Code:

<?
$db_name2 = "totals";
$table_name2 = "totalstable";

$connection2 = @mysql_connect("$host", "$username") or die ("Could not connect2.");

$db2 = @mysql_select_db($db_name2, $connection2) or die ("no db connection2");

$sql2 = "select base, totaltofund, funded, moneypaid from
$table_name2 where postdate = $processdate";

$result2 = mysql_query($sql2,$connection2) or die ("posxxxxTop2");
$count2 = mysql_num_rows($result2);
?>.....

View Replies !
How To Submit Form.
I got my form all built and it validates it self, but I get to the bottom of my valdition and it says if $errormsg = ' ' and I don't know how to post all the info to an action page. Currently my form tag has now "action".

I want to post to an action page, then say is all this stuff correct? then post to an action page, to insert in to the db.

View Replies !
Php File Delete Form
How would i go about making a file delete form in php. so that the user can delete .jpg and .gif files from a web directory.

View Replies !
Mysql Delete From A Form
i'm trying to find out how to get this to work. You type in a name of a record in the database and it removes it. In this case it's deleting the record that when you type in the name of the server it looks for it in the column "servername". You type in the servername and it will delete the whole record. Code:

View Replies !
Preview Form Button
What I want to do is print all the values entered in a form for the user without the form text. Then it should let them submit the form from this "preview screen." The problem is that that form loses the values on the preview page for the finish button. Does everyone just create hidden inputs to do this, or is there an easier way?

View Replies !
Form Button Click Itself.
is it possible that  on a php script that i can make the form button click itself.

so i have a button that when a certain argument happens i want to click on itself thus resetting itself and doing the php script associated with the button being clicked the php is on a form on php self.  know it sounds strange but i have some coding that needs to reset itself and only does that when the button is clicked just want a work around. failing that is it possible to use jave to achive this.

View Replies !

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