Re: [PHP] Using PHP to get user input via checkbox through a data base

2005-07-27 Thread Wil Hitchman

Thank you Jim...this is helpful.  I will try this when I get home.

Wil
- Original Message - 
From: Jim Moseby [EMAIL PROTECTED]

To: php-general@lists.php.net
Sent: Tuesday, July 26, 2005 4:03 PM
Subject: RE: [PHP] Using PHP to get user input via checkbox through a data 
base





Hello everyone,

What I want to do is have a form (which is already created)
where the user selects (via checkbox) on an item or group of
items (almost like a shopping cart).  These items are stored
in a MySql database and the program was written in PHP.  So
far I have created an insert form that inserts the products
into a database.  The database is displayed in a form where
the user now needs to click on the select box so that he/she
can choose their items.  Once they have chosen the items a
confirmation page is supposed to come out with the user's
choices and the user will confirm that this is correct or not
and either click submit or go back to choose again.  If they
click submit than I am supposed to receive an email with all
of the user's choices.  The part I am still stuck in is when
the user attempts to choose, nothing really happens.
Following is the code that displays the database and allows
the user to choose via the check boxAny help would be
appreciated.

?php require_once('Connections/connBlog.php'); ?
?php
mysql_select_db($database_connBlog, $connBlog);
$query_Recordset1 = SELECT * FROM ebay_products;
$Recordset1 = mysql_query($query_Recordset1, $connBlog) or
die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
?
?php require_once('Connections/connBlog.php'); ?

html
head
titleUntitled Document/title
meta http-equiv=Content-Type content=text/html;
charset=iso-8859-1
/head
body
div align=center
  pnbsp;/p
  form action= method=post name=form1
table width=75% height=10% border=10
align=center cellpadding=0 cellspacing=0 bordercolor=#99FFCC
  tr
tddiv align=centerDescription of Product/div/td
tddiv align=centerCoupon Amount/div/td
tddiv align=centerExpiration Date/div/td
tddiv align=centerYour Selection/div/td
  /tr
  ?php do { ?
  tr
td width=65%
  div align=center?php echo
$row_Recordset1['product']; ?/div/td
td width=8%
  div align=center$?php echo
$row_Recordset1['discount']; ?/div/td
td width=15%
  div align=center?php echo
$row_Recordset1['expire']; ?/div/td
td width=2%
  div align=center
input name=select type=checkbox id=select
value=checkbox
  /div/td
  /tr
  ?php } while ($row_Recordset1 =
mysql_fetch_assoc($Recordset1)); ?
/table
table width=25% border=0 cellspacing=0 cellpadding=0
  tr
td
div align=center
input type=submit name=Submit value=Submit
  /div/td
td
div align=center
input name=back type=button id=back
value=Go Back
  /div/td
  /tr
/table
pnbsp;/p
  /form
  pnbsp;/p
/div
p align=center a href=ebayinsert.phpInsert Data/a/p
/body
/html
?php
mysql_free_result($Recordset1);
?



Problems I see right off the bat are:
 1)  your form tag has no action (action=), therefore no action will be
taken upon submit.
 2)  your checkboxes have no unique value, so even if your form WAS being
submitted to some other page, you wouldn't be able to tell which ones were
checked.

To solve these problems, set your form action to the page that is to 
process

the POST, then change this line:


input name=select type=checkbox id=select
value=checkbox


...to be something like


input name=select type=checkbox id=select
value=?php echo $row_Recordset1['product'];?


JM

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Using PHP to get user input via checkbox through a database

2005-07-26 Thread Wil Hitchman
Hello everyone, 

What I want to do is have a form (which is already created) where the user 
selects (via checkbox) on an item or group of items (almost like a shopping 
cart).  These items are stored in a MySql database and the program was written 
in PHP.  So far I have created an insert form that inserts the products into a 
database.  The database is displayed in a form where the user now needs to 
click on the select box so that he/she can choose their items.  Once they have 
chosen the items a confirmation page is supposed to come out with the user's 
choices and the user will confirm that this is correct or not and either click 
submit or go back to choose again.  If they click submit than I am supposed to 
receive an email with all of the user's choices.  The part I am still stuck in 
is when the user attempts to choose, nothing really happens.  Following is the 
code that displays the database and allows the user to choose via the check 
boxAny help would be appreciated.  

?php require_once('Connections/connBlog.php'); ?
?php
mysql_select_db($database_connBlog, $connBlog);
$query_Recordset1 = SELECT * FROM ebay_products;
$Recordset1 = mysql_query($query_Recordset1, $connBlog) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
?
?php require_once('Connections/connBlog.php'); ?
 
html
head
titleUntitled Document/title
meta http-equiv=Content-Type content=text/html; charset=iso-8859-1
/head
body
div align=center 
  pnbsp;/p
  form action= method=post name=form1
table width=75% height=10% border=10 align=center cellpadding=0 
cellspacing=0 bordercolor=#99FFCC
  tr 
tddiv align=centerDescription of Product/div/td
tddiv align=centerCoupon Amount/div/td
tddiv align=centerExpiration Date/div/td
tddiv align=centerYour Selection/div/td
  /tr
  ?php do { ?
  tr 
td width=65% 
  div align=center?php echo $row_Recordset1['product']; 
?/div/td
td width=8% 
  div align=center$?php echo $row_Recordset1['discount']; 
?/div/td
td width=15% 
  div align=center?php echo $row_Recordset1['expire']; 
?/div/td
td width=2% 
  div align=center 
input name=select type=checkbox id=select value=checkbox
  /div/td
  /tr
  ?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?
/table
table width=25% border=0 cellspacing=0 cellpadding=0
  tr 
td
div align=center 
input type=submit name=Submit value=Submit
  /div/td
td
div align=center
input name=back type=button id=back value=Go Back
  /div/td
  /tr
/table
pnbsp;/p
  /form
  pnbsp;/p
/div
p align=center a href=ebayinsert.phpInsert Data/a/p
/body
/html
?php
mysql_free_result($Recordset1);
?

Re: [PHP] SOLVEDphp Full Page Calendar not date picker

2005-04-29 Thread Wil Hitchman
Well you could have shared that script with us.  I am actually looking for 
the same thing.

Thanks,
Wil
- Original Message - 
From: Angelo Zanetti [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: PHP List php-general@lists.php.net
Sent: Friday, April 29, 2005 5:25 AM
Subject: Re: [PHP] SOLVEDphp Full Page Calendar not date picker


I got a script from a friend of mine.
Otherwise I would have definitely given the URL...
Petar Nedyalkov wrote:
On Friday 29 April 2005 11:43, Angelo Zanetti wrote:

Dont worry guys i solved it.

And if you name the solution, it'll be a perfect finish for this thread.
Remember, this mailing-list is used as a knowledge base from a lot of 
people.


Angelo Zanetti wrote:

Hi all.
Im looking for a PHP/Javascript calender that is a full page calender.
IE: for each day there is  quite a big block. Therefore it will be a
bigger form of a date picker. What I want to do is to be able to assign
notes for each day. I've seen the smarty calender which is exactly what
I need but Im not using smarty for this particular project.
thanks in advance.




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Apache 2.0.52, PHP 5.03, FreeBSD 4.10 memory problems

2005-02-09 Thread Wil Hitchman
I definetly amIRRITATING!
- Original Message - 
From: Mikey [EMAIL PROTECTED]
To: php-general@lists.php.net
Sent: Wednesday, February 09, 2005 6:10 AM
Subject: RE: [PHP] Apache 2.0.52, PHP 5.03, FreeBSD 4.10 memory problems


[snip]
Hope everybody else is sending this guy read receipts?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Php error with MySql

2005-01-07 Thread Wil Hitchman
Apologies...just have had loose fingers
- Original Message - 
From: Jay Blanchard [EMAIL PROTECTED]
To: Wil [EMAIL PROTECTED]; php-general@lists.php.net
Sent: Thursday, January 06, 2005 3:31 PM
Subject: RE: [PHP] Php error with MySql

[snip]
...stuff...
Wil
[/snip]
I replied to this over an hour ago, please do not repost.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Php error with MySql

2005-01-06 Thread Wil Hitchman
I get the following error 

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result 
resource in /home/wilmail/public_html/elblog.php on line 7
n=   //error ends here

with the following bit of code

$qResult = mysql_query (SELECT * FROM blog_entries ORDER BY id DESC);

$nRows = mysql_num_rows($qResult);
$rString =n=.$nRows;

If I am just naming a variable how is the argument not valid?

Thanks, 

Wil

[PHP] How do you work this thing

2004-12-09 Thread Wil Hitchman
How does this work?

[PHP] Forms In PHP

2004-12-09 Thread Wil Hitchman
Hi, 

I created a web form in PHP and used a couple of email addresses.  The only 
email address that worked when I submitted to the form (for testing purposes) 
was my Yahoo address.  My AOL, hotmail and other work addresses did not work.  
Can someone tell me why?

Thanks, 

Wil