Jump to content

NickG21

Members
  • Posts

    146
  • Joined

  • Last visited

    Never

Everything posted by NickG21

  1. Hey everyone, I'm working on some form submission/validation code and I was wondering if there was anywa that using the code below I could set the variable names as well? Right now im just displaying the data; foreach ($_POST as $key => $value) { echo $key . ":"; echo $value . "<br/>"; } Displays like this, properly; ShipCuFName:nick ShipCuLName:girard ShipCuAddr:12 autumn ave but i'd like to be able to assign the actual field name $key(ShipCuFName) is referring to as a variable with the $value (nick)in it without having to individually code it? thank you in advance! NickG
  2. hey everyone it was an error in an include file i had at the top of the page. sorry for the late response but thank you for your help
  3. Hey everyone, I felt like i was pretty proficient with PHP but I haven't been able to get passed this stupid error i am getting and it's killing me. I only have 1 page im initially working on and i can't figure this out; Parse error: syntax error, unexpected T_VARIABLE in /home/...index.php on line 38 <?php $query = "SELECT * from tblBlog"; $result = mysql_query($query); $numrows = mysql_num_rows($result); Line 38: for ($i= 0; $i < $numrows; $i++){ $row = mysql_fetch_array($result); $title = $row['Title']; $link = $row['Link']; $writeup = $row['Writeup']; $comments = $row['Comments']; echo $title . "<br/>"; echo $link . "<br/>"; echo $writeup . "<br/>"; } ?> thank you in advance, nick
  4. Hey everyone, I'm looking to put the results of my MySQL query into multiple pages. I followed the online tutorial at http://www.evolt.org/node/19340 in order to get as far as I am. With the code below I display the first page, counts the proper amount of results, creates the proper links on the bottom of the page such as Page 1 | Page 2 etc... depending on the number of results. The only thing that doesn't work is displaying these next pages. When i click on these links or the "Next" link for the next page it just reloads the same first 9 results. If you have any idea what to do i'd appreciate it thank you <?php if(!empty($_GET['searchterm'])){ $search = mysql_real_escape_string(trim($_GET['searchterm'])); if (!($limit)){ $limit = 9;} // Default results per-page. if ( !$page or $page < 0 ) { $page = 0; } // Default page value. $numresults = mysql_query("SELECT * FROM tblProduct WHERE PrName LIKE '%". $search ."%'"); // the query. $numrows = mysql_num_rows($numresults); // Number of rows returned from above query. if ($numrows == 0){ echo("No results found matching your query - $search"); // bah, modify the "Not Found" error for your needs. exit();} $pages = intval($numrows/$limit); // Number of results pages. // $pages now contains int of pages, unless there is a remainder from division. if ($numrows % $limit) { $pages++;} // has remainder so add one page $current = intval($page/$limit) + 1; // Current page number. if (($pages < 1) || ($pages == 0)) { $total = 1;} // If $pages is less than one or equal to 0, total pages is 1. else { $total = $pages;} // Else total pages is $pages value. $first = $page + 1; // The first result. if (!((($page + $limit) / $limit) >= $pages) && $pages != 1) { $last = $page + $limit;} //If not last results page, last result equals $page plus $limit. else{ $last = $numrows;} // If last results page, last result equals total number of results. if(isset($_GET['page']) && $_GET['page'] >= 1 && $_GET['page'] <= $pagecount){ $page = (int)$_GET['page']; } $skip = ($page - 1) * $resultsper; ?> </div><span class="sectionheader">Search Results:</span><span class="items"><?php echo writeShoppingcart(); ?></span> <div id="content"> <table width="100%" border="0"> <tr> <td width="50%" align="left"> Results <b><?=$first?></b> - <b><?=$last?></b> of <b><?=$numrows?></b> </td> <td width="50%" align="right"> Page <b><?=$current?></b> of <b><?=$total?></b> </td> </tr> </table> <?php // Now we can display results. $result = mysql_query("SELECT * FROM tblProduct WHERE PrName LIKE '%". $search ."%' ORDER BY PrName ASC LIMIT $page, $limit"); echo '<div id="parentdiv" style="width:660px">'; while($row = mysql_fetch_array($result)){ echo '<div style="width:220px;float:left;">'; echo '<div class="itemname"> <a href="products.php?id=' . $row['PrID'] . '"> ' . $row['PrDispName'] . '</a></div>'; echo '<div class="brand">Maker: ' . $row['PrBrand'] . '</div>'; echo '<div class="recentproduct"><img src="' . $row['PrImage'] . '" alt=' . $row['PrName'] . '"></div>'; echo '<div class="price">$ ' . $row['PrPrice'] . '</div>'; echo '<div class="addtocart"><a href="cart2.php?action=add_item&id=' . $row['PrID'] . '&qty=1">Add to Cart</a></div>'; echo '</div>'; ?> <? }?> </div> <?php if ($page != 0) { // Don't show back link if current page is first page. $back_page = $page - $limit; echo("<a href=\"$PHP_SELF?searchterm=$search&page=$back_page&limit=$limit\">back</a> \n");} for ($i=1; $i <= $pages; $i++) // loop through each page and give link to it. { $ppage = $limit*($i - 1); if ($ppage == $page){ ?> <table> <tr> <td align="left" width="50%"> <?php echo("<b>$i</b>\n");} // If current page don't give link, just text. else{ echo("<a href=\"$PHP_SELF?searchterm=$search&page=$ppage&limit=$limit\">$i</a> \n");} } if (!((($page+$limit) / $limit) >= $pages) && $pages != 1) { // If last page don't give next link. $next_page = $page + $limit; echo(" <a href=\"$PHP_SELF?searchterm=$search&page=$next_page&limit=$limit\">next</a>");} ?> </td> <td width="50%" align="right"> Results per-page: <a href="<?=$PHP_SELF?>?searchterm=<?=$search?>&page=<?=$page?>&limit=5">5</a> | <a href="<?=$PHP_SELF?>?searchterm=<?=$search?>&page=<?=$page?>&limit=10">10</a> | <a href="<?=$PHP_SELF?>?searchterm=<?=$search?>&page=<?=$page?>&limit=20">20</a> | <a href="<?=$PHP_SELF?>?searchterm=<?=$search?>&page=<?=$page?>&limit=50">50</a> </td> </tr> </table>
  5. Am I able to edit these files using this or just embed them into the site in order to be viewed by the user? I believe I know how to embed the file to just be viewed, it's having it act as an editable file that is the trouble. Maybe i'm just not reading correctly the documentation, if you could help more that would be excellent and thank you for the suggestion im going to read more into it as well.
  6. Hey Everyone, I was wondering if anyone knew of a way to display an exiting pdf file onto a website as a form for a user to then fill in and subsequently have sent as an e-mail attachment or uploaded to an FTP site. I know how to do the e-mailing or FTP automatic upload, but displaying a .pdf file that is saved on the sites FTP or network server as a form is beyond me. Anyone have any ideas? Thank you in advance, Nick
  7. i have, i originally was setting it as setcookie('cartId', $sess, time() + (3600 * 24)); so i could keep it for one day, but it wasn't working so i tried just setting it without an expiration
  8. hey everyone, i am just making a very basic shopping cart/basket on my site and im tracking which user in the DB by putting in their session id as the unique CartID for each user. i have this located in an include file with my database information, and the cookie is not being set, i cannot view it through echo and checking it in IE's temp files and Mozilla's cookie viewer shows it is not being set. i dont understand what i am doing wrong any help will be great, this is my include. <?php $dbusername="blah blah"; $dbpassword="blah"; $database="balahaha"; $host ="localhost"; function GetCartId() { // This function will generate an encrypted string and // will set it as a cookie using set_cookie. This will // also be used as the cookieId field in the cart table if(!isset($_COOKIE['cartId'])) { session_start(); $sess = session_id(); setcookie('cartId', $sess); return $sess; } else { // There is no cookie set. We will set the cookie // and return the value of the users session ID return $_COOKIE['cartId']; } } mysql_connect($host,$dbusername,$dbpassword); @mysql_select_db($database) or die( "Unable to select database"); ?>
  9. i relabeled all of my checkboxes to be seen as an array Reasons[] and values are still only passed one at a time. here is the PHP i have, i am not sure how to write the Isset function but here is what i have, and it still sends the same error. <?php if (isset($_POST['submit'])) { $company = $_POST['CompanyName']; $name = $_POST['realname']; $email = $_POST['email']; $domainName = $_POST['ListorDomainName']; $username = $_POST['Username']; $password = $_POST['Password']; $credit = $_POST['CreditCardNumber']; $resend = $_POST['Resend']; if (isset($_POST['Reasons'])) { $reasons = implode(', '. $_POST['Reasons']); } $reasonstext = $_POST['Reasonstext']; $ServiceName = $_POST['ServiceName']; $ServiceText = $_POST['ServiceText']; $to = ''; $subject = 'Cancellation Request'; if (empty($username) && empty($password)){ $to = '.....com'; $msg .= "Company: $company\n"; $msg .= "Name: $name\n"; $msg .= "E-Mail: $email\n"; $msg .= "Domain Name: $domainName\n"; $msg .= "Credit Card: $credit\n"; $msg .= "ReSend Manual: $resend\n"; $msg .= "Service To Cancel: $ServiceName \n"; $msg .= "Reasons For Cancelling: $reasons\n"; }else{ $to = '.....edu'; $msg .= "Company: $company\n"; $msg .= "Name: $name\n"; $msg .= "E-Mail: $email\n"; $msg .= "Domain Name: $domainName\n"; $msg .= "Credit Card: $credit\n"; $msg .= "ReSend Manual: $resend\n"; $msg .= "Service To Cancel: $ServiceName \n"; $msg .= "Reason(s) For Cancelling: $reasons\n"; } mail($to, $subject, $msg, "From: $email"); header("location: http://.../thankyou.html"); } ?>
  10. bwoch, when i try using the implode command, i get the error: Warning: implode(): Bad arguments. in .../CancelRequest.php on line 12 Warning: Cannot modify header information - headers already sent by (output started at /home/web/.../CancelRequest.php:12) in /home/web/.../CancelRequest.php on line 41 here is the code for the part of the form with radio buttons and checkboxes. <input name="ServiceName" id="request" type="radio" value="Announcement Email List Hosting"> Announcement Email List Hosting<br> <input name="ServiceName" id="request" type="radio" value="Discussion Email List Hosting"> Discussion Email List Hosting<br> <input name="ServiceName" id="request" type="radio" value="Web Hosting"> Web Site Hosting<br> <input name="ServiceName" id="request" type="radio" value="Pay Per Click Bid Management"> Pay Per Click Bid Management<br> <input name="ServiceName" id="request" type="radio" value="Dedicated Server"> Dedicated Server Hosting<br> <input name="ServiceName" id="request" type="radio" value="Enterprise Email Filtering"> Enterprise Email Filtering<br> <input name="ServiceName" id="request" type="radio" value="Email / Webmail Accounts"> Email / Webmail Accounts<br> <input name="ServiceName" id="request" type="radio" value="Other"> Other <input name="ServiceName" id="request" size="30"> </td> </tr> <tr> <td class="header">Reasons for Canceling <span class="note" style="padding-left: 1em; font-size: 80%;">(Check all that apply.)</span> </td> </tr> <tr> <td class="oneColumnOptions"> <input type="checkbox" name="Reasons" id="request" value="NotUsing Service"> Not Using Service<br> <input type="checkbox" name="Reasons" id="request" value="Dissatisfied with Features of Service" id="request"> Dissatisfied with Features of Service<br> <input type="checkbox" name="Reasons" value="Ineffective Business Solution" id="request"> Ineffective Business Solution<br> <!-- specifically for mailing list --> <input type="checkbox" name="Reasons" id="request" value="Only Send Occational Mailings"> Only Send Occasional Mailings (<span class="note" style="font-weight: normal;">For Mailing List Hosting only</span>)<br> <input type="checkbox" name="Reasons" id="request" value="Poor Delivery of Email Newsletter to Subscribers"> Poor Delivery of Email Newsletter to Subscribers (<span class="note" style="font-weight: normal;">For Mailing List Hosting only</span>)<br> <!-- --> <input type="checkbox" name="Reasons" id="request" value="Found a Less Expensive Alternative"> Found a Less Expensive Alternative<br> <input type="checkbox" name="Reasons" id="request" value="Went with an In-house Solution"> Went with an In-house Solution<br> <input type="checkbox" name="Reasons" id="request" value="Technical Issues"> Technical Issues<br> <input type="checkbox" name="Reasons" id="request" value="Too Difficult to Use Service"> Too Difficult to Use Service<br> <input type="checkbox" name="Reasons" id="request" value="Dissatisfied with Technical Support"> Dissatisfied with Technical Support<br> <input type="checkbox" name="Reasons" id="request" value="Poor Customer Service"> Poor Customer Service<br> <input type="checkbox" name="Reasons" id="request" value="Poor Billing Process"> Poor Billing Process<br> <input type="checkbox" name="Reasons" id="request" value="Went Out of Business"> Went Out of Business<br> <input type="checkbox" name="Reasons" id="request" value="Sold Company"> Sold Company<br> <input type="checkbox" name="Reasons" id="request" value="Other"> Other <input name="OtherReasons" id="request" size="30">
  11. hey everyone i have a set of radio buttons and a set of checkboxes that have the same names for each group. ServiceName = radiobutton group reasons = checkbox group When the user selects a radio button and/or one or many checkboxes the value is supposed to be passed into a variable and sent in an e-mail. the only problem is that the values are not taken. i have another checkbox that is individual in it's name on the page and the value is passed fine from it. below is my code. if anyone has an idea of how i can retrieve these values it would be appreciated. thanks in advance. this is only the PHP: <?php if (isset($_POST['submit'])) { $company = $_POST['CompanyName']; $name = $_POST['realname']; $email = $_POST['email']; $domainName = $_POST['ListorDomainName']; $username = $_POST['Username']; $password = $_POST['Password']; $credit = $_POST['CreditCardNumber']; $resend = $_POST['Resend']; $reasons = $_POST['Reasons']; $subject = 'Cancellation Request'; $ServiceName = $_POST['ServiceName']; $to = ''; if (empty($username) && empty($password)){ $to = 'mail1@mail.com'; $msg .= "Company: $company\n"; $msg .= "Name: $name\n"; $msg .= "E-Mail: $email\n"; $msg .= "Domain Name: $domainName\n"; $msg .= "Credit Card: $credit\n"; $msg .= "ReSend Manual: $resend\n"; $msg .= "Service To Cancel: $ServiceName \n"; $msg .= "Reasons For Cancelling: $reasons\n"; }else{ $to = 'mail2@mail.com; $msg .= "Company: $company\n"; $msg .= "Name: $name\n"; $msg .= "E-Mail: $email\n"; $msg .= "Domain Name: $domainName\n"; $msg .= "Credit Card: $credit\n"; $msg .= "ReSend Manual: $resend\n"; $msg .= "Service To Cancel: $ServiceName \n"; $msg .= "Reasons For Cancelling: $reasons\n"; } mail($to, $subject, $msg, "From: $email"); header("location: http://.../thankyou.html"); } ?>
  12. The entire form is pretty lengthy but here are the areas with the checkboxes and radio buttons, i hope it isn't too messy <input type="checkbox" name="Resemd" ID="OwnersManual" value="Yes" onClick="DisableControlGroup(this, request)"> Request to resend the owners manual. <p class="note" style="padding: 0.3em 1em; font-weight: normal;">Skip the rest of the fields and <a href="#submit">click the "Submit" button</a> at the bottom of the page.<br> For your protection, we cannot process your cancellation request until we confirm your customer verification information. </p> </div> </td> </tr> <tr> <td class="header">Service to Cancel</td> </tr> <tr> <td class="oneColumnOptions"> <input name="ServiceName" id="request" type="radio" value="Announcement Email List Hosting"> Announcement Email List Hosting<br> <input name="ServiceName" id="request" type="radio" value="Discussion Email List Hosting"> Discussion Email List Hosting<br> <input name="ServiceName" id="request" type="radio" value="Web Hosting"> Web Site Hosting<br> <input name="ServiceName" id="request" type="radio" value="Pay Per Click Bid Management"> Pay Per Click Bid Management<br> <input name="ServiceName" id="request" type="radio" value="Dedicated Server"> Dedicated Server Hosting<br> <input name="ServiceName" id="request" type="radio" value="Enterprise Email Filtering"> Enterprise Email Filtering<br> <input name="ServiceName" id="request" type="radio" value="Email / Webmail Accounts"> Email / Webmail Accounts<br> <input name="ServiceName" id="request" type="radio" value="Other"> Other <input name="ServiceName" id="request" size="30"> </td> </tr> <tr> <td class="header">Reasons for Canceling <span class="note" style="padding-left: 1em; font-size: 80%;">(Check all that apply.)</span> </td> </tr> <tr> <td class="oneColumnOptions"> <input type="checkbox" name="Reasons" id="request" value="NotUsing Service"> Not Using Service<br> <input type="checkbox" name="Reasons" id="request" value="Dissatisfied with Features of Service" id="request"> Dissatisfied with Features of Service<br> <input type="checkbox" name="Reasons" value="Ineffective Business Solution" id="request"> Ineffective Business Solution<br> <!-- specifically for mailing list --> <input type="checkbox" name="Reasons" id="request" value="Only Send Occational Mailings"> Only Send Occasional Mailings (<span class="note" style="font-weight: normal;">For Mailing List Hosting only</span>)<br> <input type="checkbox" name="Reasons" id="request" value="Poor Delivery of Email Newsletter to Subscribers"> Poor Delivery of Email Newsletter to Subscribers (<span class="note" style="font-weight: normal;">For Mailing List Hosting only</span>)<br> <!-- --> <input type="checkbox" name="Reasons" id="request" value="Found a Less Expensive Alternative"> Found a Less Expensive Alternative<br> <input type="checkbox" name="Reasons" id="request" value="Went with an In-house Solution"> Went with an In-house Solution<br> <input type="checkbox" name="Reasons" id="request" value="Technical Issues"> Technical Issues<br> <input type="checkbox" name="Reasons" id="request" value="Too Difficult to Use Service"> Too Difficult to Use Service<br> <input type="checkbox" name="Reasons" id="request" value="Dissatisfied with Technical Support"> Dissatisfied with Technical Support<br> <input type="checkbox" name="Reasons" id="request" value="Poor Customer Service"> Poor Customer Service<br> <input type="checkbox" name="Reasons" id="request" value="Poor Billing Process"> Poor Billing Process<br> <input type="checkbox" name="Reasons" id="request" value="Went Out of Business"> Went Out of Business<br> <input type="checkbox" name="Reasons" id="request" value="Sold Company"> Sold Company<br> <input type="checkbox" name="Reasons" id="request" value="Other"> Other <input name="OtherReasons" id="request" size="30">
  13. hey everyone, i am looking to get the values of my radio buttons and checkboxes and have the values added to my $msg variable and sent in an e-mail. this is my code: <?php if (isset($_POST['submit'])) { $company = $_POST['CompanyName']; $name = $_POST['realname']; $email = $_POST['email']; $domainName = $_POST['ListOrDomainName']; $username = $_POST['Username']; $password = $_POST['Password']; $credit = $_POST['CreditCardNumber']; $resend = $_POST['Resend']; <---Checkbox $subject = 'Cancellation Request'; $reasons = $_POST['Reasons']; <---Checkboxes $ServiceName = $_POST['ServiceName']; <----Radio Buttons $to = ''; if (empty($username) && empty($password)){ $to = 'blah@mail.com'; $msg .= $company; $msg .= $name; $msg .= $domainName; $msg .= $resend; $msg .= $reasons; $msg .= $ServiceName; }else{ $to = 'blahblah@mail.com'; $msg .= $company; $msg .= $name; $msg .= $domainName; $msg .= $resend; $msg .= $reasons; $msg .= $ServiceName; } mail($to, $subject, $msg, "From: $name, <$email>"); header("location: .../thankyou.html"); } ?> the e-mails send well and change the e-mail address accordingly except the only things i get in the email are the text boxes entered and the word "array" if any of the other items are checked off. any ideas?
  14. $query= "SELECT * FROM ContactInfo WHERE username='$user'"; $result= mysql_query($query); $num = mysql_num_rows($result); $num is supposed to be the value of the username that is selected from the database so it can then take the information linked with it and redisplay on the page to be updated.
  15. that is the code for update.php? is this terribly wrong lol?
  16. it says that the short_open_tag is on but thanks for the idea
  17. hey everyone, im fairly new to the incorporation of php and mySQL and i am looking to start off by making a user info database that will hold contact information as well as a username and password field. below is the code for the site i want to use to allow the user to "update" their info. My problem is when i click the link to "edit" info after the user has logged in, the page displays blank. here is my code, any help is much appreciated. thanks in advance. <?php include("dbinfo.inc.php"); mysql_connect($host,$dbusername,$dbpassword); @mysql_select_db($database) or die( "Unable to select database"); $query= "SELECT * FROM ContactInfo WHERE username='$user'"; $result= mysql_query($query); $num = mysql_num_rows($result); mysql_close(); $i=0; while ($i < $num) { $first=mysql_result($result,$i,"ud_first"); $last=mysql_result($result,$i,"ud_last"); $address=mysql_result($result,$i,"ud_address"); $city=mysql_result($result,$i,"ud_city"); $state=mysql_result($result,$i,"ud_state"); $zip=mysql_result($result,$i,"ud_zip"); $country=mysql_result($result,$i,"ud_country"); $email=mysql_result($result,$i,"ud_email"); $phone=mysql_result($result,$i,"ud_phone"); $fax=mysql_result($result,$i,"ud_fax"); ?> <form action="update.php"> <input type="hidden" name="ud_id" value="<? echo "$id"; ?>"> First Name: <input type="text" name="ud_first" value="<? echo "$first"?>"><br> Last Name: <input type="text" name="ud_last" value="<? echo "$last"?>"><br> Address: <input type="text" name="ud_address" value="<? echo "$address"?>"><br> City: <input type="text" name="ud_city" value="<? echo "$city"?>"><br> State: <input type="text" name="ud_state" value="<? echo "$state"?>"><br> Zip: <input type="text" name="ud_zip" value="<? echo "$zip"?>"><br> Country: <input type="text" name="ud_country" value="<? echo "$country"?>"><br> E-mail: <input type="text" name="ud_email" value="<? echo "$email"?>"><br> Phone Number: <input type="text" name="ud_phone" value="<? echo "$phone"?>"><br> Fax Number: <input type="text" name="ud_fax" value="<? echo "$fax"?>"><br> <input type="Submit" value="Update"> </form> <? $i++; } ?>
  18. hey everyone im looking to create a basic shopping cart without using a MySQL database. the reason for this is because i am working for an E-Mail Marketing and Newsletter company that also does web-hosting. They offer 2 different packages for their services and I want to be able to provide a user to add multiple services to a cart and then afterwards only fill in their contact information and billing etc.... one time. I have searched for tutorials and i am unsure of where exactly to begin with this. anyone with any insight would be greatly appreciated. Thank you in advance
  19. hey everyone i was just wondering if anyone had ever constructed a calculator in php.  i looked through multiple examples online and found only very basic calculators. what i am looking to do is make a form with three input boxes..... List Size Message Size Mail Sent Per Week. Depending on the values entered i want to do calculations and redisplay the prices in 6 different textboxes.  3 for an enterprise edition and 3 for a professional edition. here is a beginning of the code i am looking at but i already am unsure how to handle the input.  maybe a select case?? any help is appreciated. thank you [code]if(isset($_POST['submit'])) { $ListSize = $_POST['ListSize']; $MessageSize = $_POST['MessageSize']; $MailSent = $_POST['MailSent']; $ProfListOnly = $_POST['ProfListOnly']; $ProfTotal = $_POST['ProfTotal']; $EntListOnly = $_POST['EntListOnly']; $EntTotal = $_POST['EntTotal']; $Bandwidth = $_POST['Bandwidth']; if(intval($ListSize) <= 2000){ $EntTotal = "$45"; $EntListOnly = "$45"; else if(intval($ListSize) <= 3000){         $EntTotal = "$60"; and so on and so forth...... } } ?>[/code]
  20. hey everyone, i was just wondering if anyone knew a good syntax to create a set of radio buttons through php. i am using a ZervWizard class for my base and it creates drop-downs in this method: [code]<?php foreach ($wizard->FreqOfMail as $k => $v) { ?> <option value="<?= $k ?>"<?php if ($wizard->getValue('FreqOfMail') == $k) { ?> <?php } ?>> <?= $v ?> </option> <?php } ?>[/code] i was wondering if from this syntax anyone could help me dervive a way to make a set of radio buttons or a checkbox/checkboxes. any help is appreciated thank you in advance
  21. i guess not...... thanks anyway  ::)
  22. as i am sure most of you have read AT LEAST one post of mine involving this, my situation has yet to improve all of that much. all of the information i have been receiving from everyone has been great and has led me closer and closer to achieving what i want but I just can't seem to get there overall. As i mentioned yesterday i am using a class i wrote using the ZervWizard.class.php from phpriot.com and have used his example to create my own class. The form works extremely well, except I am unable to process any checkboxes or radio buttons and i don't know why. i cannot print or echo their values or anything and i don't know why. here is the format that the ZervWizard class takes variables, and how i am trying to display them. [code]$SendReports = $this->coalesce($form['SendReports'],''); $this->setValue('SendReports', $SendReports); SendReports is a set of 3 radio buttons <b>List Administrator Reports:</b> <?= $wizard->getValue('SendReports')?> [/code] This displays the values of regular text boxes and drop down menus fine, but will not work for this radio button or checkbox situation. anyone have any ideas?
  23. hey everyone i am getting an error, unexpected $ on the last line of my code.  I am sure the problem lies inside this chunk below because when this chunk is not present the code runs fine, can anyone find my syntax error, i can't seem to. [code]<?php if ($wizard->getStepName() == 'ContInfo') { ?>           <table>             <tr>               <td>Organization Name:</td>               <td>                 <input type="text" name="Company" value="<?= htmlSpecialChars($wizard->getValue('Company')) ?>" />               </td>               <td>                 <?php if ($wizard->isError('Company')) { ?>                   <?= $wizard->getError('Company') ?>                 <?php } ?>               </td>             </tr>             <tr>               <td>Contact Person:</td>               <td>                 <input type="text" name="ContactPerson" value="<?= htmlSpecialChars($wizard->getValue('ContactPerson')) ?>" />               </td>               <td>                 <?php if ($wizard->isError('ContactPerson')) { ?>                   <?= $wizard->getError('ContactPerson') ?>                 <?php } ?>               </td>             </tr>             <tr>               <td>E-Mail Address:</td>               <td>                 <input type="text" name="ContEmail" value="<?= htmlSpecialChars($wizard->getValue('ContEmail')) ?>" />               </td>               <td>                 <?php if ($wizard->isError('ContEmail')) { ?>                   <?= $wizard->getError('ContEmail') ?>                 <?php } ?>               </td>               <tr>               <td>Address:</td>               <td>                 <input type="text" name="Address" value="<?= htmlSpecialChars($wizard->getValue('Address')) ?>" />               </td>               <td>                 <?php if ($wizard->isError('Address')) { ?>                   <?= $wizard->getError('Address') ?>                 <?php } ?>               </td> </tr> <tr> <td>City:</td>               <td>                 <input type="text" name="City" value="<?= htmlSpecialChars($wizard->getValue('City')) ?>" />               </td>               <td>                 <?php if ($wizard->isError('City')) { ?>                   <?= $wizard->getError('City') ?>                 <?php } ?>               </td> </tr> <tr> <td>Zip:</td>               <td>                 <input type="text" name="Zip" value="<?= htmlSpecialChars($wizard->getValue('Zip')) ?>" />               </td>               <td>                 <?php if ($wizard->isError('Zip')) { ?>                   <?= $wizard->getError('Zip') ?>                 <?php } ?>               </td> </tr> <tr> <td>Zip:</td>               <td>                 <input type="text" name="Phone" value="<?= htmlSpecialChars($wizard->getValue('Phone')) ?>" />               </td>               <td>                 <?php if ($wizard->isError('Phone')) { ?>                   <?= $wizard->getError('Phone') ?>                 <?php } ?>               </td> </tr> <tr> <td>Zip:</td>               <td>                 <input type="text" name="Fax" value="<?= htmlSpecialChars($wizard->getValue('Fax')) ?>" />               </td>               <td>                 <?php if ($wizard->isError('Fax')) { ?>                   <?= $wizard->getError('Fax') ?>                 <?php } ?>               </td> </tr>           </table>[/code]
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.