Re: [PHP] Help needed on php/mysql

2004-11-02 Thread Garth Hapgood - Strickland
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...

  ?php
  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
  html
  head
  titleMatchmakers - empowerment opportunities network/title
  meta http-equiv=Content-Type content=text/html; charset=iso-8859-1
  link href=style.css rel=stylesheet type=text/css
  script language=JavaScript type=text/JavaScript

  !--

  function MM_preloadImages() { //v3.0 
  var d=document; if(d.images){ if(!d.MM_p) d .MM_p=new Array();
  var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; ia.length; i++)
  if (a[i].indexOf(#)!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
  }

  !-- Hide from old browsers
  function error_popup() {
  newwin = window.open(error_popup.php,sss,height=470,width=450)
  }
  // end hiding --

  //-- 

  /script

  /head
  body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0
  !-- header //--
  ?php require('includes/header.php'); ?
  !-- header_eof //--
  !-- body //--
  table width=100% border=0 cellspacing=2 cellpadding=5 
background=images/page_bg.gif
  tr 
  td valign=toptable width=130
  tr
  td width=120 align=right class=pagetitlebrregistrationimg 
src=images/register_image.gif/td
  /tr
  /table/td 
  td
  table width=100% border=0 cellpadding=0 cellspacing=0
  tr valign=top 
  pbrbrbFill in all the fields below correct and accurately, then click 
Register Now./bbrbr
  /tr
  tr
  tdtable width=65%
  form title=register method=post onsubmit=return check_form();
?php
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; 
}

? 
  tr
  td class=formAreaTitle.: Business Contact Details/td
  /tr
  tr
  td class=main
  table border=0 width=100% cellspacing=4 cellpadding=0 class=formArea
  tr
  td width=45% align=right class=contentBusiness Name:/td
  td width=55%input class=content type=text size=35 maxlength=100 
name=business_name/td
  /tr
  tr
  td width=45% align=right class=contentBusiness Owner:/td
  td width=55%input class=content type=text size=35 maxlength=100 
name=business_owner/td
  /tr
  tr
  td width=45% align=right class=contentStreet Address:/td
  td width=55%input class=content type=text size=35 maxlength=100 
name=street_address/td
  /tr
  tr
  td width=45% align=right class=contentSuburb:/td
  td width=55%input class=content type=text size=35 maxlength=100 
name=suburb/td
  /tr
  tr
  td width=45% align=right class=contentCity/Town:/td
  td width=55%input class=content type=text size=35 maxlength=100 
name=city_town/td
  /tr
  tr
  td width=45% align=right class=contentProvince:/td
  td width=55% 
  select class=content name=province_desc id=selectoption value=-- select 
one --/option
  ?PHP for($x=0;$x$number_provinces;$x++)
  {
  echo('option value='.$rijprovinces[$x][ProvinceID].'');
  echo(''.$rijprovinces[$x][Description].'/option');
  }
  ?
  /select
  /td
  /tr
  tr
  td width=45% align=right class=contentStreet Code:/td
  td width=55%input class=content type=text size=5 maxlength=4 
name=street_code/td
  /tr
  tr
  td width=45% align=right class=contentPostal Address:/td
  td width=55%textarea rows=5 cols=35 class=content 
name=postal_address/textarea/td
  /tr
  tr
  td width=45% align=right class=contentPostal Code:/td
  td width=55%input class=content type=text size=5 maxlength=4 
name=postal_code/td
  /tr
  tr
  td width=45% align=right class=contentWebsite Address:/td
  td width=55%input class=content type=text size=35 maxlength=50 
name=website_address/td
  /tr
  /table
  /td 
  /tr 
  tr
  td class=formAreaTitle.: Business Information/td
  /tr
  tr
  td class=main width=60%
  table border=0 width=100% cellspacing=4 cellpadding=0 class=formArea
  tr
  td width=45% align=right 

Re: [PHP] Help needed on php/mysql

2004-11-02 Thread Lists
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...
  ?php
  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
  html
  head
  titleMatchmakers - empowerment opportunities network/title
  meta http-equiv=Content-Type content=text/html;  
charset=iso-8859-1
  link href=style.css rel=stylesheet type=text/css
  script language=JavaScript type=text/JavaScript

  !--
  function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d .MM_p=new Array();
  var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0;  
ia.length; i++)
  if (a[i].indexOf(#)!=0){ d.MM_p[j]=new Image;  
d.MM_p[j++].src=a[i];}}
  }

  !-- Hide from old browsers
  function error_popup() {
  newwin = window.open(error_popup.php,sss,height=470,width=450)
  }
  // end hiding --
  //--
  /script
  /head
  body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0
  !-- header //--
  ?php require('includes/header.php'); ?
  !-- header_eof //--
  !-- body //--
  table width=100% border=0 cellspacing=2 cellpadding=5  
background=images/page_bg.gif
  tr
  td valign=toptable width=130
  tr
  td width=120 align=right class=pagetitlebrregistrationimg  
src=images/register_image.gif/td
  /tr
  /table/td
  td
  table width=100% border=0 cellpadding=0 cellspacing=0
  tr valign=top
  pbrbrbFill in all the fields below correct and accurately,  
then click Register Now./bbrbr
  /tr
  tr
  tdtable width=65%
  form title=register method=post onsubmit=return check_form();
?php
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;
}
?
  tr
  td class=formAreaTitle.: Business Contact Details/td
  /tr
  tr
  td class=main
  table border=0 width=100% cellspacing=4 cellpadding=0  
class=formArea
  tr
  td width=45% align=right class=contentBusiness Name:/td
  td width=55%input class=content type=text size=35  
maxlength=100 name=business_name/td
  /tr
  tr
  td width=45% align=right class=contentBusiness Owner:/td
  td width=55%input class=content type=text size=35  
maxlength=100 name=business_owner/td
  /tr
  tr
  td width=45% align=right class=contentStreet Address:/td
  td width=55%input class=content type=text size=35  
maxlength=100 name=street_address/td
  /tr
  tr
  td width=45% align=right class=contentSuburb:/td
  td width=55%input class=content type=text size=35  
maxlength=100 name=suburb/td
  /tr
  tr
  td width=45% align=right class=contentCity/Town:/td
  td width=55%input class=content type=text size=35  
maxlength=100 name=city_town/td
  /tr
  tr
  td width=45% align=right class=contentProvince:/td
  td width=55%
  select class=content name=province_desc id=selectoption  
value=-- select one --/option
  ?PHP for($x=0;$x$number_provinces;$x++)
  {
  echo('option value='.$rijprovinces[$x][ProvinceID].'');
  echo(''.$rijprovinces[$x][Description].'/option');
  }
  ?
  /select
  /td
  /tr
  tr
  td width=45% align=right class=contentStreet Code:/td
  td width=55%input class=content type=text size=5  
maxlength=4 name=street_code/td
  /tr
  tr
  td width=45% align=right class=contentPostal Address:/td
  td width=55%textarea rows=5 cols=35 class=content  
name=postal_address/textarea/td
  /tr
  tr
  td width=45% align=right class=contentPostal Code:/td
  td width=55%input class=content type=text size=5  
maxlength=4 name=postal_code/td
  /tr
  tr
  td width=45% align=right class=contentWebsite Address:/td
  td 

Re: [PHP] Help needed on php/mysql {Scanned}

2004-11-02 Thread Garth Hapgood - Strickland
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...
 
?php
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
html
head
titleMatchmakers - empowerment opportunities network/title
meta http-equiv=Content-Type content=text/html;
  charset=iso-8859-1
link href=style.css rel=stylesheet type=text/css
script language=JavaScript type=text/JavaScript
 
!--
 
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d .MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0;
  ia.length; i++)
if (a[i].indexOf(#)!=0){ d.MM_p[j]=new Image;
  d.MM_p[j++].src=a[i];}}
}
 
!-- Hide from old browsers
function error_popup() {
newwin = window.open(error_popup.php,sss,height=470,width=450)
}
// end hiding --
 
//--
 
/script
 
/head
body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0
!-- header //--
?php require('includes/header.php'); ?
!-- header_eof //--
!-- body //--
table width=100% border=0 cellspacing=2 cellpadding=5
  background=images/page_bg.gif
tr
td valign=toptable width=130
tr
td width=120 align=right class=pagetitlebrregistrationimg
  src=images/register_image.gif/td
/tr
/table/td
td
table width=100% border=0 cellpadding=0 cellspacing=0
tr valign=top
pbrbrbFill in all the fields below correct and accurately,
  then click Register Now./bbrbr
/tr
tr
tdtable width=65%
form title=register method=post onsubmit=return check_form();
  ?php
  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;
  }
 
  ?
tr
td class=formAreaTitle.: Business Contact Details/td
/tr
tr
td class=main
table border=0 width=100% cellspacing=4 cellpadding=0
  class=formArea
tr
td width=45% align=right class=contentBusiness Name:/td
td width=55%input class=content type=text size=35
  maxlength=100 name=business_name/td
/tr
tr
td width=45% align=right class=contentBusiness Owner:/td
td width=55%input class=content type=text size=35
  maxlength=100 name=business_owner/td
/tr
tr
td width=45% align=right class=contentStreet Address:/td
td width=55%input class=content type=text size=35
  maxlength=100 name=street_address/td
/tr
tr
td width=45% align=right class=contentSuburb:/td
td width=55%input class=content type=text size=35
  maxlength=100 name=suburb/td
/tr
tr
td width=45% align=right class=contentCity/Town:/td
td width=55%input class=content type=text size=35
  maxlength=100 name=city_town/td
/tr
tr
td width=45% align=right class=contentProvince:/td
td width=55%
select class=content name=province_desc id=selectoption

[PHP] Help needed on php/mysql

2004-11-01 Thread Garth Hapgood - Strickland
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



Re: [PHP] Help needed on php/mysql

2004-11-01 Thread Lists
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