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.





Master FORM Which Selects Between Slave FORMS...


I wish to have a simple multi-dropdown donate option, the user selects a pre-defined amount from dropdown1 then they choose the payment gateway (paypal, stormpay, e-gold, intgold etc) from dropdown2, then click Go!

However, each of these gateways code is embeded on the page as a form (as buttons, no input required).

Is there a way to use a "master" form in php, which selects between multiple other "slave" forms via a dropdown select and submits that value?

I also need a dynamic "payment amount" as dropdown menu (or text input) menu which inserts its value (amount to donate) anywhere on the page as a dynamic php include... (including form value fields) so when the master form is submitted, the "payment amount" include will refresh the value within any of the sub forms vaules upon submitting the MASTER form.




View Complete Forum Thread with Replies
Sponsored Links:

Related Messages:
Multiple Navigation Tables On One Page (master - Slave)
I just wanted to refresh only part of the page, i.e., table2 on my php page. here is my javascript code which performs the refresh it works fine and my php file display all the records. the only problem is: I have got two tables on the same page and i only want to refresh the second table when i click the a row of my first table rows. Code:

View Replies !   View Related
Updating Database - Selects All The Data From The Master Table
We have pages that allow the user to enter information. The data is stored in or comes from an oracle table that is not denormalized. This information is gathered on 3 pages and on the 4th page we show a summary and then update the database. My job is to add a new page before the summary page. However, the data I am gathering is in a normalized table that is linked to the other table with a foreign key.

The developer who wrote this selects all the data from the master table on page 1. The columns are all prefaced with 'AP_' and he uses the following code:

View Replies !   View Related
Dynamic Form Selects
How do you make dynamic for selects in php? It is in regards to a modify type scripts im writing in php/mysql.

So regular select drop downs look like so:

<select name=genericselect>
<option value="1" selected>1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>

right, well if I was pulling info from a database, how would I make is so that the 'selected' value is dynamic and comes from the database? Im sure theres a simple way of doing this.

View Replies !   View Related
How To Display Html Form Selects (via Checkbox) In Email?
I have a simple form to collect user selections in html form. I am
pretty new to php...how can I send the user's checkbox selects to me
in an email...I am struggling with buiding an array to send this info...

View Replies !   View Related
Slave Servers Are Up
I have some slave servers setup, and are working fine as they should. I'm running mysql on linux. I need to know that the slave servers are up at all times. To find out, I have to login to mysql (# mysql -u db_user -p) and issue the command: SHOW SLAVE STATUS G
Unfortunately, I can only do the above manually from the commandline. Is there a way to automate it in PHP.

View Replies !   View Related
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 !   View Related
Master Value
I have a dedicated server running fedora and have a problem with open_basedir.

Master value = no value;
defined in /etc/php.ini

Local value = /var/www/vhosts/domain.com/httpdocs:/tmp where is this defined? I need to change it to "no value".

View Replies !   View Related
Master - Detail
I'm new on this list and have been working for quite a while on a PHP app that will make an HTML frontend for a PostgreSQL dbms. Works fine so far but I'm having a little trouble with master - detail screens. My db (roughly) has a hierarchical structure, something like BAND -> RECORD -> SONG. When I display the record, band should be displayed on top of the screen. When song is displayed, band and record should be displayed.

At the moment I use something like storing current band, current record in a serialized _SESSION variable. It works, but not very smoothly because PHP has no idea of history, descent (the current screen doesn't know what the previous screen was). So I'm struggling a bit with this. Are there any "standard" solutions for this master. detail setup? I found a lot on macromedia, but I don't use that, it's just Vim on Linux.

View Replies !   View Related
& Master Pages
ASP.NET 2.0 is said to implement a great feature called Master Pages, does
PHP support htis feature or is it something that may be implemented soon ?

View Replies !   View Related
Security - Ssh To Master Without A Password
I'm working on a PHP application that adds user accounts to my system. However, the PHP script runs on the webserver, while the accounts need to be created on a different box, which I'll refer to as "master". Right now, on "master" I have a script which can create and destroy directories in /home, and set permissions, etc.

The script is run by a shell_exec(ssh master sudo homeDirManage.sh create $USER). I have setup the web server user to be able to ssh to master without a password, and use sudo to run homeDirManage.sh without a password. What I'm worried about is that any other user able to put up their web page can do the exact same thing, and delete home dirs. Is there a more secure way to do this?

View Replies !   View Related
Local/Master Variables
Im trying to get my apache server to run php in none-safe-mode (safe_mode == "0"). It is set like this in php.ini, however, when i look at a phpinfo(); it shows that locally this is still set on, despite the master being off. I cant find config files specific to each domain on the server - nor can i see anywhere in php.ini where other configs are included. I've tried an ini_set("safe_mode", "0"); but that didnt help. Does anyone have any ideas as to how i might be able to sort this?

View Replies !   View Related
Forms Within A Form
what is the best way do a form within a form? I have a list of files, one form is to delete the files, and the other is to give each file a title. The large form is one so users can select which files they would like to delete. (Red Border (in attachmet)) The small forms are within this to rename each file, and this is done using AJAX. (Green Border (in attachmet)) Basically what is happening, is that it is submitting the Red form, when I try to submit a green form.

View Replies !   View Related
Creating Master-Detail Page
I have an array that holds all of the information I want displayed. Dreamweaver, on the other hand, uses a MySQL statement stored in a variable...

As such, I'm wondering if any of you out there know how to create a master-detail page that has a first page, previous page, next page, and last page link that allows me to display 10 records at one time.

Also, when I go to the detail page, I especially need to know how to get the specific row's information transferred. If anyone has any ideas, that would be great.

View Replies !   View Related
Local And Master Safe_mode And Security At Host
I have the following question:

a hosting provider has turned local safe_mode off and the master
safe_mode is on. This prevents an application/php script to work.

The provider refuses to turn safe_mode off due to security reasons. They
work with some kind of virtual hosting I had a quick look at the system
and saw a /etc /bin etcetera, in the /etc there was a php.ini where
safe_mode was Off.

a few questions:
a) is turning (local) safe_mode off a real big security risk as the
provider tells us?
b) if so why is the master safe_mode turned on?

On my own system both local and master safe_mode are turned off, and I
did not modify anything when php was installed.

another question arises: where are the local and master values set?

Is there a good page on safe_mode? Google only points me a hosting
provider that allows safe_mode to be on.

View Replies !   View Related
Inserting Master-detail Records In Mysql
how I can insert a master-detail record in mysql? I use an auto-increment key, but I don't know how I can find that key for inserting the detail records, I tried to make a 'highest-key' function with 'select MAX(field)...' but in php it gives the wrong key (in mysql it gives the right one).

View Replies !   View Related
Upload Incremental Csv Files To A Master Table
I have a question about an admin webpage to upload incremental csv files to a master table.

Here is what I do currently:
- I get an excel file (turn it into a csv)
- go to phpMyAdmin and upload the csv from the SQL tab
simple, it works.

What I would like to do is this:
have the client upload the same .csv file via a webpage, a form upload field, which in turn, adds the few more records to the existing table.

When I upload via phpMyAdmin, i see the SQL that it spits out, but not sure how to implement.

View Replies !   View Related
Using A Master DB File That Has One Giant Array Stored In It.
Can you readers please post why my friend SHOULDN'T use the database method he wants to. He is using a master DB file that has one giant array stored in it. Here is an example of basically how he is using it through his class: Code:

View Replies !   View Related
Submitting Forms Form To A Database
I'm having a bit of a nightmare getting my website to submit a form to a database. If i have the form on a single page it submits fine and takes me to a page saying its been accepted, thats all good.

But, when i put the exact same code into a site which uses a manifest to load various content files into a div box, it doesn't work. The data doesn't reach the database, and it redirects to the home page, even if i miss some data it doesn't. Code:

View Replies !   View Related
Selecting Alternate Master Dictionary With Pspell Functions
Is it possible to select an alternate master dictionary when using the
pspell interface? There is a way to select a personal dictionary
(pspell_config_personal()), but that is used IN ADDITION to the default
master dictionary, which is not what I want.

I have a different English dictionary I wish to use, and I do not want
to use the default dictionary at all. However, I do not wish to mess
with the existing installation of aspell on the machine by removing the
dictionaries in place.

From the command line I can just do:

aspell --master mydict.rws

but there seems to be no way to simulate the "--master" argument using
the PHP interface. Likewise there seems to be no way to provide the
"--size" argument.

On a related note, are there any examples anywhere of how the 'jargon'
parameter might actually be used? In every example I can find it is
blank, and all references to it in documentation are elliptical at best.

I know I can do all this by piping to the aspell binary but with the
volume of text I'm looking at that's going to be really really slow.

View Replies !   View Related
Forms: Keeping Form Data After Error
WHen using forms, what's the best way to check a database(mysql) for duplicates and return the same form and data if a duplicate is found. Basically, if a user submits a form and an error occurs, let them correct the data instead of entering all data over again.

View Replies !   View Related
Selects
How come my second select form is blank for the first option? I realize the problem is when I put in the $series_design tag, but I don't know why.

View Replies !   View Related
Process Simple Form Method=post Forms?
I have done many submit forms on one server and now have built a submit form on a new server which instead of working correctly it hangs on the process page and does nothing.

Is there something that they need to be setting on the server to process simple form method=post forms? I have no control over our servers and am not a hardware/plateform person and would love any asssitance in what to look for.

View Replies !   View Related
Forms All Form Names And Text Can Be Changed Through One File
I have quite a few forms to put together for my contacts and to do database.
I would like to know the best way for dealing with the forms so that the names and form fields can be updated through one config.

For example I may have named one field first name and want to change the text to say name. By doing this through one file I dont mess up the design.

What the best of doing this.
Should I declare a variable for each field and label like this

$form_text_name ="name";
$form_text_field="<input type=text name=name>";

I then use an include file and call these using an echo tag for example
echo $form_text_name echo $form_text_field;

or could I use a define tag? Or any other suggestions

View Replies !   View Related
Multiple Selects
I want to do a multiple select like this where the user can select multiple items

<SELECT NAME="abc" MULTIPLE>
<OPTION VALUE="A">A
<OPTION VALUE="B">B
<OPTION VALUE="C">C
<OPTION VALUE="D">D
</SELECT>

How do I reference these variable in code or the form that does the processing?

View Replies !   View Related
MySQL Selects
I just made my first sql database and PHP interface for it last week I'm getting pretty far with it however I'm having a problem with the select statement. It's looking like this:

SELECT * FROM freehosted WHERE website='$website' AND type='FHG' AND category='$category' OR keywords LIKE '%$category%'

This is working good, however I ONLY want the website designated in the $website variable to display. Code:

View Replies !   View Related
Bypassing Selects
I have a profile system which allows members to input info and save it to the database for there profile. A few fields are SELECTS. From Sexuality Favourite Music, So for instance From (England, Scotland, Wales, Ireland) THat works fine, but what happens if someone makes a html document and injects code"

<OPTION>HACK HAHA</OPTION>

Then posts it to my php that excutes and writes to the database. In essance they can bypass the select I have and input what ever data they want. Whats the best way around that, I was going to use a SET in the database structure but one of the selects has about 90 options.

View Replies !   View Related
MySQL Selects
what's the most efficient way to grab a single data value from a table field using PHP. the best I have is using a while loop -- but something tells me there is a cleaner/more efficient way:

$sql="select countryType from c_countries where userid={$_SESSION[userid]}";
$result=mysql_query($sql);
while($row=mysql_fetch_array($result)){ $userCountryType = $row[countryType]; }

View Replies !   View Related
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 !   View Related
Including Database Fields In Email Forms & Other Form Issues
I need to find out how to put database fields into an email form as well as add radio buttons, drop down boxes, etc. I have some basic textarea boxes in the form part so far.

Here is my code. The upper half of the page shows a search result and the lower half is a form that my client can notify us of changes they would like to make to a specific account. Code:

View Replies !   View Related
MySQL Question (sub-selects)
I've seen a few posts about getting around the sub-select problems with MySQL. I am trying to do a "NOT IN" type select, as follows:

SELECT
email
FROM
orfcustomers
WHERE
customerid NOT IN
( SELECT
c.customerid
FROM
orfcustomers c,
orforders o
WHERE
o.customerid = c.customerid
);

Basically, I have a customer table, and an order table, and I want all customers' email addresses that have not yet placed orders.

I can't find a reasonable method for doing this, because I haven't had much experience with the INNER JOINS and LEFT JOINS, etc. Also, the tables each have over 40,000 entries, making it a little weird.

View Replies !   View Related
Selects All Of The Check Boxes
how would i make it to where someone can press all and it selects all of the check boxes in the area.

View Replies !   View Related
Dropdown Selects From $_POST
I'm still working on my form, and part of the form is an age select dropdown. I'm leading them through an approval process and if they'd like, returning them to the form to fix any errors.

The only way I know of having it show up correct in the dropdowns is to do an if statement on each option from the $_POST data. This is cumbersome, as I have 3 selection boxes with many options in each. Is there a better way to do this than to create an if statement for each option?

View Replies !   View Related
If Statement Thats Selects Whether $s Is Chosen
I have an if statement thats selects whether $s is chosen or $t is chosen or $u is chosen, if $s is chosen i want the values of $t and $u to be '&nbsp' so if $t is chosen i want the value of $s to be '&nbsp' and $u to be '&nbsp' and yes you've got it now if $u is chosen i want the value of $s and $t to be '&nbsp' Any ideas my codes below:

if ($val=='Currently In Place') $s='X'
else if ($val=='Required Essential') $t='X'
else if ($val=='Required-Recommended') $u='X'

View Replies !   View Related
GET, POST, Multi-Selects
When the HTML of a form has a field name 'choices' and has five checkboxes with that name, each with a different value, like this:

Code:
<form name="testform" action="processor.php" method="post">
<input type="checkbox" name="choices" value="One">One
<input type="checkbox" name="choices" value="Two">Two
<input type="checkbox" name="choices" value="Three">Three
<input type="checkbox" name="choices" value="Four">Four
<input type="checkbox" name="choices" value="Five">Five
<input type="submit" value="submit" name="submit">
</form>

In PHP, without altering the HTML at all (assume that I have no control over the HTML because there will be remote forms already coded by others that submit to this script) if I look at the values through the PHP-approved method (assuming that every checkbox was checked by the user), I see: Code:

View Replies !   View Related
Handle Selects W Multiple Values
does php 5 have a problem with html select lists which allow to choose multiple items?
Whatever I tried I just can't get another or more than the last item selected in the list. Even if I select multiple items, a print_r($_POST) just shows the last selected item, and not a array of all selected values.

View Replies !   View Related
Number Format - Selects Prices From A Database
I have a loop that selects prices from a database, prints each price out individually and then adds it to a variable, the "final price".

$thisprice = $row[ITEM_PRICE] * $row[SEL_ITEM_QTY];
$thisprice = number_format($thisprice, 2);
echo("$thisprice")
$finalprice = $finalprice + $thisprice;

But for some reason, when the $finalprice variable is set to more than $999, it won't display the correct price. Does anyone have any idea why this is? Does it have to do with the comma in the price? How can I fix this?

View Replies !   View Related
Nested Selects - Works In Mysql, Fails In PHP
Not sure why its failing. But if I run this statement through phpMyAdmin it works fine, but when I drop it into my php file it generates the following error. Code:

View Replies !   View Related
User Selects Browser Back Button
I using a alert JavaScript message to display once an user submits a form, the message displays fine, but say the user goes to another screen and hits the browser back button, the same message displays again, is there a way to clear the message once displayed the first time.

View Replies !   View Related
Selects The Item And Check Out/in Date And Time To Add A Reservation
It is a simple equipment check out calendar; the user selects the item and check out/in date and time to add a reservation. When I add a reservation on an item, I'm getting this error message: Code:

View Replies !   View Related
Mysql SELECT Query That Selects The Latest Items
I am building a website that has a software download category, and has news on the main page. Now I have two tables, named "news" and "software". On the main page I want to select the latest 40 updated items, so whether it is a newspost from table "news" or an extra entry in table "software", or an updated version of an entry in "software".

They are all INT types holding a time() string. what I want is a mysql SELECT query that selects the 40 latest items.

View Replies !   View Related
Dropdown List Which Selects A Post A Title (to Edit)
I want to have a dropdown list which selects a post a title (to edit), then when you click submit I want to use POST to submit the data for that post (post title, username, subject, content) so that the edit pages form fields will already be filled with the posts data.

View Replies !   View Related
How To Populate Selects With Years=>months=>days That Dynamically Change?
What I'm thinking of doing is in my admin page have three different selects. They will form the day of sales at my shop.

-YEAR- -MONTH- -DAY-

The years will have 2002 -> 2005 and the months will be the 12 months of the year of course but I need the number of days to change with the particular month selected.

View Replies !   View Related
Construct A Dynamic Navigation That Expands When A Visitor Selects A Sub-directory.
I am trying to construct a dynamic navigation that expands when a visitor selects a sub-directory. The site has 6 sub-directories, plus the root. Is there a way to use a wildcard or something, to indicate all contents of a directory?

For example (this does not work):

<?if($_SERVER['PHP_SELF']=="/cars/*"){?>

Anyone know of a solution? What about the root level, is there an option for that too?

View Replies !   View Related
Dropdown Date Selector That Automatically Selects Todays Date
Does anyone have a PHP generated dropdown date selector that automatically selects todays date on page load that i can pinch?

View Replies !   View Related
Fill Fields When User Selects User From DB
I have a field with a selectbox which contains a list of client names and several other fields which display information from the DB.

I need to be able to make the fields change to the appropriate information when a user is selected from the select box. Can anybody please give me an example of a bit of code that will do this?

View Replies !   View Related
Forms, Froms, And More Forms
How do you do a post (like the webmasterworld's) that you can view what has been posted but keep what the person typed in, in the text area.

View Replies !   View Related
Server-Side Form Submission - Form Submits To Form, Which Autosubmits. BAD!
I have a php form from which the user fills out their name and address and clicks "Submit".

The form goes to a page that stores the data in a mySQL database, then, using hidden fields, populates another form and actives with a javascript onLoad=submit() to send the information on to the final destination.

I cannot control or edit the final destinations web page, which is why the interim page is needed.

What I would like is for the user to fill out the form, and upon submission have the data recorded into the database and have the data passed on in a "form like way" on to the final destination BY THE SERVER, not by the use of a hidden form page that auto submits.

Any suggestions?

Here is the interim page's code below:

<?
$link = @mysql_connect($db_host_name, $db_name, $the_decoded_password) or die;
@mysql_select_db($db_name) or die;

$query = "INSERT INTO web_link VALUES ('', '$a', '$b', '$c','$d', '$e', '$f', '$g', '$h')";
$result = @mysql_query($query) or die;
?>
<html>
<head>
</head>
<body onLoad="document.contactme.submit();">
<form name="contactme" method="post" action="http://www.test.com/cgi/storethisdata" >
print "<input type="hidden" name="first_name" value="$first_name"><br>";
print "<input type="hidden" name="last_name" value="$last_name"><br>";
print "<input type="hidden" name="email" value="$email"><p>";
print "<input type="hidden" name="phone" value="$phone"><p>";
?>
</form>
</body>

</html>

View Replies !   View Related
Form Processing - Create A Form Processor With Processes The Form To A Page
I have searched the internet for this. I want to create a form processor with processes the form to a page which only certain people can access. I got everything down but the form processing. Does anyone have this code or can you lead me to the right direction?

View Replies !   View Related
Forms Sent More Than Once
some end-users with slow connections to the internet sometimes being able to send forms more than one. (by clicking SEND BUTTON MORE THAN ONCE).

View Replies !   View Related
PHP Forms
I have a forum with 1 text field and 1 drop down box on. Now the user can either click submit or preview. when doing preview it displays on the screen the 2 entries so that they can check before submitting it.

Now, i know how to make sure the text field has the info in that they have just typed by using value="<?=$fieldname?>"> but how do you do the same on a drop down box. eg the box has the numbers 1, 2 and 3 as options to select. 1 is selected by default but the user has now selected 2 and clicked preview but I cant get the default to now be 2 as selected instead of 1.

View Replies !   View Related
PDF Forms And FDF
I have some PDF forms of varoius documents (invoices, ...)
and I would like to populate them with data from MySQL
with PHP (on win2k3)

I tried fdf_* functions, the field filling works fine,
but my mission is not yet complete:

- Acrobat Reader can't save the complete document
(form + PDF). Can I merge "FDF" and "PDF" at the server
side using PHP ? How ?

- It seems that Acrobat reader on Linux could not
fill in forms. Many other non-acrobat reader can't.
Anyone has tryed with Acrobat Reader for linux ?
This problem will be solved if I could merge "FDF" and
"PDF" at the server side.

- In all my modules I need to replicate one or more pages.
For example in a tipical invoice form I have only 10
lines available, so I must replicate the invoice form
as many times as needed in the resulting PDF.
How can I achieve it ? I found fdf_add_template() but
it's totally undocumented ! Is it the right function for me ?
Ho does it works ?

View Replies !   View Related
2 Forms
I was handed a voting form that the company has used in previous years,
for updating. The first page is a form, asking for name, business name,
title and email address(twice for verification). The form gets posted
to a verfication PHP script that checks that the email addresses match
and that the email address isn't already in the database. If there is a
problem, it sends you back to the first form; if everything is okay it
sends you on to the second form.

The second form is the actual voting form. At the top of the screen,
the customer's information is displayed for them, using PHP variables.
So that name, business name, and title are at the top. Customer fills
out the form and clicks submit. The form forwards to a PHP script for
inserting the data into MySQL. This is where the problem comes in.
Everything but the name, title and email address gets written to the
database. I have checked my SQL query and it is find. My working theory
right now is that the second form erases all variables from the first
form, as for as the system is concerned. Here is a line of code from
the second form:

<form method="POST" action="check.php?email=<?php echo $email ?>">

It looks like the origional program was passing email in the URL which
would explain why email works but the name, business name and title
don't. I think the origional coder knew the issue. I am looking for
confirmation of my belief that only one set of variables can exist at a
time, from a form for any given method. If that is true, how do I pass
multiple variables in the URL above? I tried seperating them with
commas or ?.

View Replies !   View Related

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