Re: [PHP] Help needed on php/mysql {Scanned}
As you can see from my code, I do want to check if all mandatory fields are selected or filled in. As well as the issue of the communicationtyes. SO far I do not have fields or anything for the user to use, to select the different CommunicationTypes he wants. I am not sure how to go about this because, there is the issue that more than one "Destination" can be added for a single CommType. And the number of CommTypes is not fixed and could vary, so thats why Im not sure how much input fields etc to put on page. Does this make sense. Garth > Hmmm...I'm not sure I'm following you. You just want to know how to > deal with multiple drop down lists? Or do you want to be able to check > and make sure all the mandatory selections have been chosen? > -dg > http://www.rexruff.com > > On Nov 2, 2004, at 4:58 AM, Garth Hapgood - Strickland wrote: > > > Well my page doesnt have any of the spoken about elements on it yet, > > because I am not clear as to go about it. > > > > The fields I speak of are things that need to be added extra to my > > page. > > > > Here is my pages code so far... > > > >> require('includes/application_top.php'); > > require('registration_globals.php'); > > require('includes/form_check.js.php'); > > ?> > > !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> > > > > > > Matchmakers - empowerment opportunities network > > > > > > > > > > > > > > //--> > > > > > > > > > > > > > > > > > > > >> background="images/page_bg.gif"> > > > > > > > > registration > src="images/register_image.gif"> > > > > > > > > > > > > Fill in all the fields below correct and accurately, > > then click "Register Now. > > > > > > > > > > > if (isset($submit) && $submit == "Register Now"){ > > if (strlen($business_name) == 0) {} > > else if (strlen($business_owner) == 0) {} > > else if (strlen($street_address) == 0) {} > > else if (strlen($suburb) == 0) {} > > else if (strlen($city_town) == 0) {} > > else if (strlen($province_desc) == 0) {} > > > > $email_popup(); (the code i was trying to use to call popup > > window) > > } > > else { > > $insertquery = "INSERT INTO business > > (BusinessName, BusinessOwner, StreetAdress, Suburb, CityTown, > > ProvinceID, StreetCode, PostalAddress, PostalCode, WebsiteAddress, > > IndustryID, IndustryOther, BusinessAge, AnnualTurnoverID, > > EmpowermentProfileID, BEEScoreCardID, PreferredLocationID, > > PreferredProductService, PreferredMatchPartner, PreferredAgeID, > > PreferredTurnoverID, PreferredEmpowermentProfileID, DateRegistered, > > MarketSourceID) > > VALUES > > ($business_name, $business_owner, $street_address, '', '', '', > > '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', > > '',)"; > > > > echo "Your registration has been submitted"; > > } > > > > ?> > > > > .: Business Contact Details > > > > > > > >> class="formArea"> > > > > Business Name: > >> maxlength="100" name="business_name"> > > > > > > Business Owner: > >> maxlength="100" name="business_owner"> > > > > > > Street Address: > >> maxlength="100" name="street_address"> > > > > > > Suburb: > >> maxlength="100" name="suburb"> > > > > > > City/Town: > >> maxlength="100" name="city_town"> > > > > > > Province: > > > >> value="">-- select one -- > >> { > > echo(' > echo('>'.$rijprovinces["$x"]["Description"].''); > > } > > ?> > > > > > > > > > > Street Code: > >> maxlength="4" name="street_code"> > > > > > > Postal Address: > >> name="postal_address"> > > > > > > Postal Code: > >> maxlength="4" name="postal_code"> > > > > > > Website Address: > >> maxlength="50" name="website_address"> > > > > > > > > > > > > .: Business Information > > > > > > > >> class="formArea"> > > > > Industry: > > > >> value="">-- select one -- > >> { > > echo(' > echo('>'.$rijindustry["$x"]["Description"].''); > > } > > ?> > > > > > > > > Industry Other: > >> maxlength="100" name="industry_other"> > > > > > > Business Age > > (Years): > >> type="text" name="business_age"> > > > > > > Annual Turnover: > > > >> value="">-- select one -- > >> { > > echo(' > echo('>'.$rijann_turn["$x"]["Descr
Re: [PHP] Help needed on php/mysql
Hmmm...I'm not sure I'm following you. You just want to know how to deal with multiple drop down lists? Or do you want to be able to check and make sure all the mandatory selections have been chosen? -dg http://www.rexruff.com On Nov 2, 2004, at 4:58 AM, Garth Hapgood - Strickland wrote: Well my page doesnt have any of the spoken about elements on it yet, because I am not clear as to go about it. The fields I speak of are things that need to be added extra to my page. Here is my pages code so far... require('includes/application_top.php'); require('registration_globals.php'); require('includes/form_check.js.php'); ?> !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> Matchmakers - empowerment opportunities network
//-->
registration Fill in all the fields below correct and accurately, then click "Register Now. if (isset($submit) && $submit == "Register Now"){ if (strlen($business_name) == 0) {} else if (strlen($business_owner) == 0) {} else if (strlen($street_address) == 0) {} else if (strlen($suburb) == 0) {} else if (strlen($city_town) == 0) {} else if (strlen($province_desc) == 0) {} $email_popup(); (the code i was trying to use to call popup window) } else { $insertquery = "INSERT INTO business (BusinessName, BusinessOwner, StreetAdress, Suburb, CityTown, ProvinceID, StreetCode, PostalAddress, PostalCode, WebsiteAddress, IndustryID, IndustryOther, BusinessAge, AnnualTurnoverID, EmpowermentProfileID, BEEScoreCardID, PreferredLocationID, PreferredProductService, PreferredMatchPartner, PreferredAgeID, PreferredTurnoverID, PreferredEmpowermentProfileID, DateRegistered, MarketSourceID) VALUES ($business_name, $business_owner, $street_address, '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',)"; echo "Your registration has been submitted"; } ?> .: Business Contact Details Business Name: Business Owner: Street Address: Suburb: City/Town: Province: -- select one -- { echo(' echo('>'.$rijprovinces["$x"]["Description"].''); } ?> Street Code: Postal Address: Postal Code: Website Address: .: Business Information Industry: -- select one -- { echo(' echo('>'.$rijindustry["$x"]["Description"].''); } ?> Industry Other: Business Age (Years): Annual Turnover: -- select one -- { echo(' echo('>'.$rijann_turn["$x"]["Description"].''); } ?> Empowerment Profile: -- select one -- { echo(' echo('>'.$rijempower["$x"]["Description"].''); } ?> BEE Score Card: -- select one -- { echo(' echo('>'.$rijscorecard["$x"]["Description"].''); } ?> .: Preferred Partner Information Preferred Product Service: Preferred Match Partner: Preferred Location: -- select one -- { echo(' echo('>'.$rijprovinces["$x"]["Description"].''); } ?> Preferred Age: -- select one -- { echo(' echo('>'.$rij_age["$x"]["Description"].''); } ?> Preferred Annual Turnover: -- select one -- { echo(' echo('>'.$rij_pref_turnover["$x"]["Description"].''); } ?> Preferred Empowerment Profile: -- select one -- { echo(' echo('>'.$rij_pref_empower["$x"]["Description"].''); } ?> Market Source: -- select one -- { echo(' echo('>'.$rij_market_source["$x"]["Description"].''); } ?> Seeing the page might help. On Nov 1, 2004, at 2:52 AM, Garth Hapgood - Strickland wrote: I have written a registration page in php and have a number of edit boxes and drop-down lists. The lists are pulling data out of their respective tables, whereas the edit boxes are just for saving data. Now my main table where all my data is being saved is called Business. Onto this I have a table called BusinessCommunication which has the fields (Business
Re: [PHP] Help needed on php/mysql
Well my page doesnt have any of the spoken about elements on it yet, because I am not clear as to go about it. The fields I speak of are things that need to be added extra to my page. Here is my pages code so far... !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> Matchmakers - empowerment opportunities network //--> registration Fill in all the fields below correct and accurately, then click "Register Now. .: Business Contact Details Business Name: Business Owner: Street Address: Suburb: City/Town: Province: -- select one -- '.$rijprovinces["$x"]["Description"].''); } ?> Street Code: Postal Address: Postal Code: Website Address: .: Business Information Industry: -- select one -- '.$rijindustry["$x"]["Description"].''); } ?> Industry Other: Business Age (Years): Annual Turnover: -- select one -- '.$rijann_turn["$x"]["Description"].''); } ?> Empowerment Profile: -- select one -- '.$rijempower["$x"]["Description"].''); } ?> BEE Score Card: -- select one -- '.$rijscorecard["$x"]["Description"].''); } ?> .: Preferred Partner Information Preferred Product Service: Preferred Match Partner: Preferred Location: -- select one -- '.$rijprovinces["$x"]["Description"].''); } ?> Preferred Age: -- select one -- '.$rij_age["$x"]["Description"].''); } ?> Preferred Annual Turnover: -- select one -- '.$rij_pref_turnover["$x"]["Description"].''); } ?> Preferred Empowerment Profile: -- select one -- '.$rij_pref_empower["$x"]["Description"].''); } ?> Market Source: -- select one -- '.$rij_market_source["$x"]["Description"].''); } ?> > Seeing the page might help. > On Nov 1, 2004, at 2:52 AM, Garth Hapgood - Strickland wrote: > > > I have written a registration page in php and have a number of edit > > boxes > > and drop-down lists. The lists are pulling data out of their respective > > tables, whereas the edit boxes are just for saving data. > > > > Now my main table where all my data is being saved is called Business. > > Onto > > this I have a table called BusinessCommunication which has the fields > > (BusinessCommunicationID, BusinessID, CommunicationTypeID, > > Destination). > > > > BusinessCommunicationID = Primary Key > > BusinessID = Foreign key from Business Table > > CommunicationTypeID = Foreign key from CommunicationType table (lists > > all > > communication types) > > Destination = field where data is stored (tel number, email address or > > fax > > number etc) > > > > Now the problem is that I want the person registering to be able to > > select > > the Communication Type/s he wants to add and then be able to enter the > > relevant information for each selected CommType. There must also be > > ability > > to add 2 of the same CommType. > > > > How can I achieve this as simply and affective as possible on my > > registration page. > > > > If you have any solutions are need more information. Please let me know > > > > Many thanx > > Garth > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > -dg > http://www.rexruff.com
Re: [PHP] Help needed on php/mysql
Seeing the page might help. On Nov 1, 2004, at 2:52 AM, Garth Hapgood - Strickland wrote: I have written a registration page in php and have a number of edit boxes and drop-down lists. The lists are pulling data out of their respective tables, whereas the edit boxes are just for saving data. Now my main table where all my data is being saved is called Business. Onto this I have a table called BusinessCommunication which has the fields (BusinessCommunicationID, BusinessID, CommunicationTypeID, Destination). BusinessCommunicationID = Primary Key BusinessID = Foreign key from Business Table CommunicationTypeID = Foreign key from CommunicationType table (lists all communication types) Destination = field where data is stored (tel number, email address or fax number etc) Now the problem is that I want the person registering to be able to select the Communication Type/s he wants to add and then be able to enter the relevant information for each selected CommType. There must also be ability to add 2 of the same CommType. How can I achieve this as simply and affective as possible on my registration page. If you have any solutions are need more information. Please let me know Many thanx Garth -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -dg http://www.rexruff.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Help needed on php/mysql
I have written a registration page in php and have a number of edit boxes and drop-down lists. The lists are pulling data out of their respective tables, whereas the edit boxes are just for saving data. Now my main table where all my data is being saved is called Business. Onto this I have a table called BusinessCommunication which has the fields (BusinessCommunicationID, BusinessID, CommunicationTypeID, Destination). BusinessCommunicationID = Primary Key BusinessID = Foreign key from Business Table CommunicationTypeID = Foreign key from CommunicationType table (lists all communication types) Destination = field where data is stored (tel number, email address or fax number etc) Now the problem is that I want the person registering to be able to select the Communication Type/s he wants to add and then be able to enter the relevant information for each selected CommType. There must also be ability to add 2 of the same CommType. How can I achieve this as simply and affective as possible on my registration page. If you have any solutions are need more information. Please let me know Many thanx Garth -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php