newbie urgent help please with a form

  • helloise
  • Born
  • Born
  • helloise
  • Posts: 3

Post 3+ Months Ago

i have this code:
<td class='form_field_2'>
<?php echo link_to('Get products','doc/product?service='.$service->getId()); ?>
</td>

which when clicked on takes me to: productSuccess.php for that service
this form gives me all the products for this service:

<form action="getDocument.php" method="post">
<table width='1000px' border='0' cellspacing='0'>
<tr>
<td class='td_header_2' align='left' colspan='2' width='50%'>
Available products for service: <?php echo $service->getName(); ?>
</td>

</tr>
<tr>
<table width='600px' class='tbl_content_box' border='0' cellspacing='0'>
<tr>
<td width='100px'>Products:</td>
<td width='100px'>Graphic</td>
<td width='100px'>Text</td>
</tr>
</table>

<table>
<table width='600px' class='tbl_content_box' border='0' cellspacing='0'><?php
$product_names = LpmPagePeer::getByAllProdNames($service->getId());
foreach($product_names as $row) { ?>
<tr>
<td >&nbsp;</td><td width='200px'><?php echo $row->getName(); ?></td>
<td width='200px'><input type="checkbox" name="graphic[]" value="$row" />
</td><td width='200px'><input type="checkbox" name="text[]" value="$row" /></td>
</tr>
<?php }
?>
</table>
<table>
<tr>
<td>
<input type='submit' value='Submit'>
</td>
</tr>
</table>
</form>

for a product i can click a graphic checkbox and/or text checkbox
and when clicked on the submit button: i go to getDocument.php

<table width='1000px' border='0' cellspacing='0'>
<tr>
<td class='td_header_2' align='left' colspan='2' width='50%'>
Doc to mail for: <?php echo $service->getName(); ?>
</td>
<td class='td_header_2' align='right'>
Help&nbsp
</td>
<td class='td_header_2' align='left' width='40px' >
<img width='32' height='32' src='/images/help.png' />
</td>
</tr>
<tr>
<td>
<br/>
<table width='800px' class='tbl_content_box' border='0' cellspacing='0'>
<tr>
<td class='form_field_2'>Buongiorno 3 Publishers November 10, 2010 Campaign Url"s
</td>
<tr></tr>
<td class='form_field_2'>Graphic Campaign Url’s:
</td>
<tr></tr>
<td class='form_field_2'> Display Name: <?php

$services = LpmPagePeer::getByAllDisplName($service->getId());
foreach($services as $row)
{
echo $row->getProdDisplName();
}

?>
</td>
<tr></tr>
<td class='form_field_2'>Supplier and client Code:
<?php
$service_id = $service->getId();
$catcher_id = $service->getCatcherId();
$supplier_names = LpmAdnetworkPeer::getByName($catcher_id);
//$client_codes = LpmAdnetworkPeer::getByClientCode($catcher_id);
foreach($supplier_names as $row)
{
echo $row->getClientCode()." ".$row->getName()." ";
}

//graphic=$_POST['graphic'];
foreach ($_POST['graphic'] as $key => $row2)
{
echo "Key:".$key."Value: ".$row2;
}
//some more code follows

how will i know if a check box was checked(graphic and/or text) for which product???


please i need urgent help
thanks
Attachments:
Products.png
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

Post Information

  • Total Posts in this topic: 1 post
  • Users browsing this forum: spork and 90 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.