Jump to content

teramera

Members
  • Posts

    25
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

teramera's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thanks a ton The Little Guy, you made my day ! May you have a Wonderful Day as well. Thanks also everyone else for helping and keeping me going with the hope of getting it done. God Bless to all and Specially to phpfreaks.com for providing such a great service platform. Cheers ! Tera
  2. I tried both yours as well as Cal's suggestions. If I change that line which is line 13 I get another error saying: Parse error: syntax error, unexpected '=' on line 68
  3. Hi! Thanks The Little Guy, I tried your code but it gives this error: Parse error: syntax error, unexpected '=' on line 13 I really appreciate your help, could you pls take some more time and help me pls.
  4. When I do as you recommended it still gives an error. Parse error: syntax error, unexpected T_ELSEIF on line 230
  5. Hi ! htmlstig, I tried what you recommended above but now i get this error: Parse error: syntax error, unexpected T_ELSE on line 322 Can you pls take a look at it and help. Thanks in advance.
  6. Hi!, I read up on the php stuff as a newbie and tried out editing an php script file. I am not getting any syntax error now but still i am making something wrong in the code. Its showing the code part also .... it should only read " Sign up or Register to be able to contact us." and if the member is registered then they should be allowed to give the rankings. Can you pls help. The output is reading like this: The code is here: <? session_start(); include("../includes/connection.php"); include("../includes/config.php"); $sql_sellerdetails = "select * from buyer, buyer_profile WHERE buyer.BuyerID=buyer_profile.BuyerID and buyer.BuyerID=".$_REQUEST['BuyerID']; $result_sellerdetails = mysql_query($sql_sellerdetails); $row_sellerdetails = @mysql_fetch_array($result_sellerdetails); if(@mysql_num_rows($result_sellerdetails ) > 0) { ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title><?=$row_sellerdetails['CompanyName']?></title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link href="../style.css" rel="stylesheet" type="text/css"> <style type="text/css"> <!-- body { margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; } --> </style> <script language="javascript"> function validate(theform) { if(theform.Name.value == "") { alert("Please enter Name"); theform.Name.focus(); return false; } else if(theform.Comment.value == "") { alert("Please enter Comment"); theform.Comment.focus(); return false; } return true; } function showComment() { document.getElementById('addcomment').style.display = "block"; document.getElementById('commentlink').style.display = "none"; } </script> </head> <body> <table border="0" cellspacing="0" width="1000" align="center"> <Tr> <? include("topheader.php"); ?> </Tr> <Tr> <Td> <table border="0" cellpadding="0" cellspacing="0" width="1000" align="center"> <Tr><td colspan="2" align="center" valign="middle" background="../images/companyheadingbg.jpg" height="86"> <? if($row_sellerdetails['CompanyLogo'] != "") { ?> <img src="../<?=$row_sellerdetails['CompanyLogo']?>" border="0" align="absmiddle" style="border:2px solid #8080C0"> <a href="index.php?BuyerID=<?=$_REQUEST['BuyerID']?>" class="companyheading"><?=$row_sellerdetails['CompanyName']?></a> <? } else { ?> <a href="index.php?BuyerID=<?=$_REQUEST['SellerID']?>" class="companyheading"><?=$row_sellerdetails['CompanyName']?></a> <? } ?> </td></Tr> <Tr><td colspan="2"> <table border="0" cellpadding="0" cellspacing="0" width="100%" background="../images/GSMenuBg.gif"> <td align="center" height="32"><a href="index.php?BuyerID=<?=$_REQUEST['BuyerID']?>" class="whitenav">Home</a></td> <td width="2"><img src="../images/gsmenubgright.gif" border="0"></td> <Td align="center"><a href="buying_leads.php?BuyerID=<?=$_REQUEST['BuyerID']?>" class="whitenav">Buying Leads</a></Td> <td width="2"><img src="../images/gsmenubgright.gif" border="0"></td> <Td align="center"><a href="blogs.php?BuyerID=<?=$_REQUEST['BuyerID']?>" class="whitenav">Blogs</a></Td> <td width="2"><img src="../images/gsmenubgright.gif" border="0"></td> <? if($row_sellerdetails['GoldMember'] == 1) { ?> <Td align="center"><a href="about_us.php?BuyerID=<?=$_REQUEST['BuyerID']?>" class="whitenav">About Us</a></Td> <td width="2"><img src="../images/gsmenubgright.gif" border="0"></td> <? } ?> <Td align="center"><a href="view_contact_details.php?BuyerID=<?=$_REQUEST['BuyerID']?>" class="whitenav">Contact Us</a></Td> </table> </td></Tr> <Tr> <td width="21%" align="left" valign="top"> <table border="0" cellpadding="0" cellspacing="0" height="10"><Tr><td></td></Tr></table> <!-- start of company profile--> <table border="0" cellpadding="0" cellspacing="0" width="95%"> <Tr> <Td width="9" height="26"><img src="../images/bar-box_01.gif"></Td> <Td background="../images/bar-box_03.gif" class="heading"><a href="about_us.php?BuyerID=<?=$_REQUEST['BuyerID']?>#companyprofile" class="headinglink">Company Profile</a></Td> <Td width="9" height="26"><img src="../images/bar-box_05.gif"></Td> </Tr> </table> <!-- end of company profile --> <!-- start of rating/comment--> <table border="0" cellpadding="0" cellspacing="0" height="10"><Tr><td></td></Tr></table> <table border="0" cellpadding="0" cellspacing="0" width="95%"> <Tr> <Td width="9" height="26"><img src="../images/bar-box_01.gif"></Td> <Td background="../images/bar-box_03.gif" class="heading"> <a href="ratings.php?BuyerID=<?=$_REQUEST['BuyerID']?>" class="headinglink">Ratings/Comments</a> </Td> <Td width="9" height="26"><img src="../images/bar-box_05.gif"></Td> </Tr> </table> <!-- end of rating/comment --> <table border="0" cellpadding="0" cellspacing="0" height="10"><Tr><td></td></Tr></table> <!-- start of contact Us--> <table border="0" cellpadding="0" cellspacing="0" width="95%"> <Tr> <Td width="9" height="26"><img src="../images/bar-box_01.gif"></Td> <Td background="../images/bar-box_03.gif" class="heading">Contact Us</Td> <Td width="9" height="26"><img src="../images/bar-box_05.gif"></Td> </Tr> <Tr> <Td background="../images/bar-box_09.gif"></Td> <Td background="../images/bar-box_10.gif"> <table border="0" cellpadding="3" cellspacing="0" width="100%" class="leftbar"> <Tr><td height="5"></td> <td></td> </Tr> <? $sqlContactUs = "SELECT * FROM buyer, buyer_profile where buyer.BuyerID=buyer_profile.BuyerID and buyer.BuyerID=".$_REQUEST['BuyerID']; $resultContactUs = mysql_query($sqlContactUs, $conn); if (@mysql_num_rows($resultContactUs)!=0){ $row_ContactUs = @mysql_fetch_array($resultContactUs); echo " <Tr> <td width='3'></td> <td class='contentblack'> ".$row_ContactUs['CompanyName']." <br><br> <strong>Address:</strong><br> ".$row_ContactUs['StreetAddress']." ".$row_ContactUs['StreetAddress2']." ".$row_ContactUs['StreetAddress3']." ".$row_ContactUs['City']." <br> <br>"; ?> <a href="contact_now.php?BuyerID=<?=$_REQUEST['BuyerID']?>"><img src="../images/inquire_now.gif" border="0"></a> <br> <br> <img src="../images/view_contact.gif" border="0" align="absmiddle"> <a href="view_contact_details.php?BuyerID=<?=$_REQUEST['BuyerID']?>" class="contactus">View Contact Details</a> <? echo "</td> </Tr> "; } ?> </table> </Td> <Td background="../images/bar-box_11.gif"></Td> </Tr> <Tr> <Td width="9" height="13"><img src="../images/bar-box_15.gif"></Td> <Td background="../images/bar-box_16.gif"></Td> <Td width="9" height="13"><img src="../images/bar-box_17.gif"></Td> </Tr> </table> <!-- end of contact us--> </td> <td width="79%" align="center" valign="top"> <table width="99%" border="0" align="center" cellpadding="0" cellspacing="0"> <Tr height="10"><Td></Td></Tr> <!-- start view Contact Details --> <Tr><Td> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <Tr> <Td width="7" height="22"><img src="../images/topleft.gif"></Td> <Td background="../images/top.gif" class="heading">Ratings/Reviews/Comments</Td> <Td width="8" height="22"><img src="../images/topright.gif"></Td> </Tr> <Tr> <Td background="../images/left.gif"></Td> <Td align="left"> <? if($_REQUEST['r']=="1") { ?> <br> <p class="redbold">Your feedback has been recorded.</p> <? } else { ?> <br> <? } ?> <?php if ($_SESSION['Name'] !=""){ ?> <div id="commentlink"><a href="javascript:showComment();" class="edit">Click here to post Comment/Rating</a></span><br></div> <div id="addcomment" style="display:none;"> <form method="post" action="add_comment.php?BuyerID=<?=$_REQUEST['BuyerID']?>" onSubmit="return validate(this);"> <table border="0" width="100%" style="border:1px solid #cccccc;" cellpadding="3"> <tr bgcolor="#CCCCCC"><Td colspan="2" class="headings" style="color:#666666 ">Post a Comment</Td></tr> <tr><Td align="right" class="content">Name:</Td><td><input type="text" name="Name" id="Name"></td></tr> <tr><Td align="right" class="content">Rating:</Td><td><select name="Rating"> <option value="0">0</option> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> <option value="6">6</option> <option value="7">7</option> <option value="8">8</option> <option value="9">9</option> <option value="10">10</option> </select></td></tr> <tr><Td align="right" class="content">Comment:</Td><td><textarea name="Comment" id="Comment" cols="50" rows="5"></textarea></td></tr> <tr><Td></Td><td><input type="submit" value="Submit"></td></tr> </table> </form> </div> <?php } else { ?> <a href="signmeup.php>"><img src="../images/signmeup.gif" border="0"></a> Sign up or Register to be able to contact us.<br><br> $sqlcomments = "SELECT * from buyercomments where Status=1 and BuyerID=".$_REQUEST['BuyerID']. " order by AddedDate desc"; $resultcomments= mysql_query($sqlcomments); if (@mysql_num_rows($resultcomments)!=0){ ?> <br> <? while($row_comments = @mysql_fetch_array($resultcomments)) { ?> <p class="content"> <span style="color:#990000;">Comment By: <?=$row_comments['CommentBy']?></span> - <span style="color:#666666">Posted on <?=date("M d, Y",strtotime($row_comments['AddedDate']))?></span> <br> <span style="color:#000066">Rating: </span><img src="../images/rating<?=$row_comments['Rating']?>.gif" border="0"> <br> <?=$row_comments['Comment']?> </p> <? } } ?> </Td> <Td background="../images/right.gif"></Td> </Tr> <Tr> <Td width="7" height="4"><img src="../images/bottomleft.gif"></Td> <Td background="../images/bottom.gif"></Td> <Td width="8" height="4"><img src="../images/bottomright.gif"></Td> </Tr> </table> </Td></Tr> <!-- end of view contact details --> </table></td> </Tr> </table> </Td></Tr> <? include "footer.php"; ?> </table> </body> </html> <? } else { echo "Sorry, no record found.."; } ?>
  7. A Big Thank You Mchl, rhodesa and The Little Guy I will check out the links you gave me. Thanks once again . You guys make PHPFreaks rock. Have Great Day!
  8. Hi! I am getting an Syntax error with the following code. Coul someone pls hep correct it. Also can you point me where I can read up about writing correct sytax for php, its about time that i get to lern this now. Thanks for your help and time. <? if ($_SESSION['Name'] !=""){ <a href="contact_now.php?BuyerID=<?=$_REQUEST['BuyerID']?>"><img src="../images/inquire_now.gif" border="0"></a><br><br> <img src="../images/view_contact.gif" border="0" align="absmiddle"> <a href="view_contact_details.php?BuyerID=<?=$_REQUEST['BuyerID']?>" class="contactus">View Contact Details</a>; } else { <a href="signmeup.php>"><img src="../images/signmeup.gif" border="0"></a> Sign up or Register to be able to contact us.<br><br>; ?>
  9. Hi!, want to use htaccess redirection to get the following: Currently in my website I am getting the link as http://mydomain.com/up_auction_detail.php?auction_id=92&cat_id=1&auction_title=Cars%20volvo%20deluxe I would like the URL to show as : http://mydomain.com/up_auction_detail/92/1/Cars_volvo_deluxe.htm The auction_id=92&cat_id=1&auction_title=Cars%20volvo%20deluxe part is a variable and the inputs change as per whatever is there in the result etc being pulled from mysql database. Can someone please help me with the code that i need to put in the .htaccess file to acheive this? Thanks in advance Regards tera
  10. Hi! premiso, My friends server as well as mine are running the same version of php which is PHP Version 5.2.8, I just checked and we both are on the same hosting provider. So that should be the issue i guess. I appreciate your concern , and am grateful for your help. Thanks tera
  11. I got this script from another friend, its the first time that i am trying to get it running on my end. Any help would be much appreciated.. Regards tera
  12. Could the problem be somewhere in the form validator..... Here is the code from that file: <?PHP # ---------------------------------------------------------------------------------------------------- # * FILE: /class_formValidator.php # ---------------------------------------------------------------------------------------------------- /** * FormValidator * * This class validates forms nested in html files. * It can validate fields on following criteria: * - required field * - content ( email, digit, alpha, word ) * - own perl or posix regular expression * - length ( min, max, equal ) * - only defined values ( for select, radio and checkbox ) * - forbidden values * - field values dependecies * + value can only exist with other field(s) * + value must be equal to other field(s) ( eg. on pass verification ) * + value must exists OR/XOR other value(s) * - It handles fields named like an array ( eg. radiobox/checkbox ) * - It can highlight the badly validated fields ( with smarty templates ) * - It can return an array which information which fields were badly validated ( with field name, or logical name ) * **/ /* Description Parameters of form elem that are being processed by the class $elem = array ( 'name' => string, // all 'type' => string, // text or select // text covers html types: text, textarea, hidden, password // select covers html types: select, checkbox and radio 'label' => string, // field label ( eg. 'Phone number' ) 'required' => boolean, // field must have value 'cont' => string, // content type: email, word, alpha, digit 'ereg' => string, // text, textarea 'preg' => string, // text, textarea 'len' => integer, // accurate length 'len_min' => integer, // min length 'len_max' => integer, // max length 'val_max' => integer, // max value of an integer ( use with cont == digit ) 'val_min' => integer, // min value of an integer ( use with cont == digit ) 'values' => array; // select accepted values 'forbid' => array; // forbidden values that match other criteria 'arr_size_min' => integer // when field name is an array( eg. 'phones[]' ) // minimum number of elements in array // Fields dependencies 'eqal' => mixed, // array or string, // value of this field must be equal to value of field in array() // eg. in when there are two password boxes either array or string 'with' => mixed, // array or string, value must exist with other value(s) 'alt_or' => mixed, // array or string, at least one of fields must have a value 'alt_xor' => mixed // array or string, only one field must have a value ); */ class FormValidator { /** * Form definition * * @var array * @access private */ var $elems = array(); /** * If error occured while validation * * @var boolean * @access private */ var $err = false; /** * Validation status for each field * * @var array * @access private */ var $validElems = array(); /** * Fields that need dependency check * * @var array * @access private */ var $secPhase = array(); /** * Constructor * * @param mixed $elems form definition * @access public * @return void */ function FormValidator(&$elems) { if ( is_array($elems) ) { // hmm... is_array($elems[0]) ? $this->elems = $elems : $this->elems[] = $elems; } } /** * Validates Form * * @param array $request - $_GET, $_POST, $_SESSION or other data * @access public * @return boolean true - validation OK, false - validation error */ function validate(&$request) { // validated elems $this->validElems = array(); $this->err = false; // fields that needs dependency check $this->secPhase = array(); foreach ( $this->elems as $e ) { $name = $e['name']; isset($e['label']) ? null : $e['label'] = null; // Field not present in html form if ( !isset($request[$name]) ) { if($e['required']){ $this->_setError($name, $k, $v, $e['label']); continue; } else { $this->validElems[$name][$k] = array('value'=>$v,'validation'=>true,'label'=>$e['label']); } } $val = $request[$name]; // If field name is an array ( eg. phones[] in example above ) if ( is_array($val) ) { if ( !empty($e['arr_size_min']) && $e['arr_size_min'] > 0 ) { $c = 0; foreach($val as $v) { if ( !empty($v) ) { $c++; } } if ( $c < $e['arr_size_min'] ) { $this->_setError($name, $k, $v, $e['label']); continue; } } } // Each value is converted to an array else { $val = array($val); } foreach ( $val as $k => $v ) { if ( !empty($e['required']) && (empty($v) && $v != "0")) { $this->_setError($name, $k, $v, $e['label']); continue; } elseif ( empty($v) ) { $e['validated'] = true; $this->validElems[$name][$k] = array('value'=>$v,'validation'=>true,'label'=>$e['label']); continue; } if ( in_array($e['type'], array('text')) ) { if ( !empty($e['len']) && $e['len'] != strlen($v) ) { $this->_setError($name, $k, $v, $e['label']); continue; } if ( !empty($e['len_min']) && strlen($v) < $e['len_min'] ) { $this->_setError($name, $k, $v, $e['label']); continue; } if ( !empty($e['len_max']) && strlen($v) > $e['len_max'] ) { $this->_setError($name, $k, $v, $e['label']); continue; } if ( !empty($e['val_min']) && $v < $e['val_min'] ) { $this->_setError($name, $k, $v, $e['label']); continue; } if ( !empty($e['val_max']) && $v > $e['val_max'] ) { $this->_setError($name, $k, $v, $e['label']); continue; } if ( !empty($e['ereg']) && !ereg($e['ereg'], $v) ) { $this->_setError($name, $k, $v, $e['label']); continue; } if ( !empty($e['preg']) && !preg_match($e['preg'], $v) ) { $this->_setError($name, $k, $v, $e['label']); continue; } if ( !empty($e['forbid']) && in_array($v, $e['forbid']) ) { $this->_setError($name, $k, $v, $e['label']); continue; } if ( isset($e['cont']) && in_array($e['cont'], array('email', 'alpha', 'word', 'digit','date','money')) ) { $expr = ''; // just temporally // digits only if ( $e['cont'] == 'digit' ) { $expr = "/^\d*$/"; } // email verify elseif ( $e['cont'] == 'email' ) { if ( !$this->verifyEmail($v) ) { $this->_setError($name, $k, $v, $e['label']); continue; } } elseif ( $e['cont'] == 'alpha' ) { $expr = "/^[a-zA-Z]*$/"; } elseif ( $e['cont'] == 'word' ) { $expr = "/^\w*$/"; } elseif ( $e['cont'] == 'date' ) { $expr = "/^(??:(?:0?[13578]|1[02])(\/|-)31)|(??:0?[1,3-9]|1[0-2])(\/|-)(?:29|30)))(\/|-)(?:[1-9]\d\d\d|\d[1-9]\d\d|\d\d[1-9]\d|\d\d\d[1-9])$|^(??:0?[1-9]|1[0-2])(\/|-)(?:0?[1-9]|1\d|2[0-8]))(\/|-)(?:[1-9]\d\d\d|\d[1-9]\d\d|\d\d[1-9]\d|\d\d\d[1-9])$|^(0?2(\/|-)29)(\/|-)(??:0[48]00|[13579][26]00|[2468][048]00)|(?:\d\d)?(?:0[48]|[2468][048]|[13579][26]))$/"; } elseif ( $e['cont'] == 'money' ) { $expr = "/^[0-9]{1,}+[,,.][0-9]{2,2}$/"; } // del first condition when class would be complete... if ( !empty($expr) && !preg_match($expr, $v) ) { $this->_setError($name, $k, $v, $e['label']); continue; } } if ( !empty($e['with']) ) { $this->secPhase[] = $e; } if ( !empty($e['equal']) ) { $this->secPhase[] = $e; } foreach ( array('with', 'equal', 'alt_or', 'alt_xor') as $eq ) { if ( !empty($e[$eq]) ) { $this->secPhase[] = $e; break; } } } elseif ( $e['type'] == 'select' ) { if ( isset($e['values']) && !in_array($v, $e['values']) ) { $this->_setError($name, $k, $v, $e['label']); continue; } foreach ( array('with', 'equal', 'alt_or', 'alt_xor') as $eq ) { if ( !empty($e[$eq]) ) { $this->secPhase[] = $e; break; } } } // hmm... else { $this->_setError($name, $k, $v, $e['label']); continue; } $this->validElems[$name][$k] = array('value'=>$v,'validation'=>true,'label'=>$e['label']); } } $this->_validateSecondPhase($request); return $this->err; } /* * Dependency check * * @param array array $request - $_GET, $_POST, $_SESSION or other data * @access private * @return void */ function _validateSecondPhase(&$request) { foreach ( $this->secPhase as $e ) { $name = $e['name']; $val = $request[$name]; if ( !is_array($val) ) { $val = array($val); } foreach ( $val as $k => $v) { if ( isset($e['with']) && is_array($e['with']) ) { foreach ($e['with'] as $eq) { if ( !empty($v) && empty($this->validElems[$eq][$k]['value']) ) { $this->_setError($eq, $k, $v, $e['label']); continue; } } } elseif ( !empty($e['with']) && !empty($v) && empty($this->validElems[$e['with']][$k]['value']) ) { $this->_setError($e['with'], $k, $v, $e['label']); continue; } if ( isset($e['equal']) && is_array($e['equal']) ) { foreach ( $e['equal'] as $eq ) { if ( $v != $this->validElems[$eq][$k]['value'] ) { $this->_setError($name, $k, $v, $e['label']); continue; } } } elseif ( !empty($e['equal']) && $v != $this->validElems[$e['equal']][$k]['value'] ) { $this->_setError($name, $k, $v, $e['label']); continue; } if ( isset($e['alt_or']) && is_array($e['alt_or']) && empty($v) ) { $c = 0; foreach ( $e['alt_or'] as $eq ) { empty($this->validElems[$e['alt_or']][$k]['value']) ? $c++ : null; } if ( $c == 0 ) { $this->_setError($name, $k, $v, $e['label']); continue; } } elseif ( !empty($e['alt_or']) && empty($v) && empty($this->validElems[$e['alt_or']][$k]['value']) ) { $this->_setError($e['with'], $k, $v, $e['label']); continue; } if ( isset($e['alt_xor']) && is_array($e['alt_xor']) ) { $c = 0; foreach ( $e['alt_xor'] as $eq ) { empty($this->validElems[$e['alt_xor']][$k]['value']) ? null : $c++; } if ( empty($v) && $c != 1 ) { $this->_setError($e['with'], $k, $v, $e['label']); continue; } elseif ( !empty($v) && $c > 0 ) { $this->_setError($e['with'], $k, $v, $e['label']); continue; } } elseif ( !empty($e['alt_xor']) ) { if ( empty($v) && empty($this->validElems[$e['alt_xor']][$k]['value']) ) { $this->_setError($e['with'], $k, $v, $e['label']); continue; } elseif ( !empty($v) && !empty($this->validElems[$e['alt_xor']][$k]['value']) ) { $this->_setError($e['with'], $k, $v, $e['label']); continue; } } } } } /** * Email verification * * @param string $email * @access private * @return boolean true if OK otherwise false */ function verifyEmail($email) { $expr = '/^(.+)@(([a-z0-9\.-]+)\.[a-z]{2,5})$/i'; $uexpr = "/^[a-z0-9\~\!\#\$\%\&\(\)\-\_\+\=\[\]\;\:\'\"\,\.\/]+$/i"; if (preg_match($expr, $email, $regs)) { $username = $regs[1]; $host = $regs[2]; //if (checkdnsrr($host, MX)) { if (preg_match($uexpr, $username)) { return true; } else { return false; } } else { return false; } } /** * WARNING ! * Function name will be changed in future releases * * Highlight field/text with Smarty - if you don't use smarty it's quite useless... * * * @param object $s - Smarty object * @param string $class_name - a css class name to assign * @access public * @return void */ function assignErrorClass(&$s, $class_name) { foreach ( $this->validElems as $k => $v ) { foreach ( $v as $k1 => $v1) { if ( $v1[1] === false ) { $err_c[$k][$k1] = $class_name; } } } $s->assign('err_c', $err_c); } /** * * Setting error * * @param string $name field name * @param integer $k key value usually 0 until field name is an array ( eg. phones[]) * @param string $value field value * @param string $label - field label * @access private * @return void */ function _setError($name, $k=0, $value = '', $label = '') { $this->validElems[$name][$k] = array('value'=>$value,'validation'=>false,'label'=>$label); $this->err = true; } /** * get array with validation result * * @access public * @return array - array with validation result for each field */ function getValidElems() { return $this->validElems; } } ?>
  13. Hi! jonsjava, I tried your code what you gave me , but it still gives me the same error message and does not post. Perhaps its something in the where the email posting code is in the scripts..... Can you guide me to find which file would be responsible for this part of the work. Cause if i post the message all in one line then the form works. Regards tera
  14. I had entered the text in the body feild like this: Testing this message with multiple lines with enter break Regards Misha.
  15. Hi! rondog, I entered the echo string which you gave me like this : <?php echo $_POST['body']; ?> above where the form part was and submitted the form: While I entered the text in multiple lines using the ENter Key to break lines like this: the echo command came back looking like this with the text in one single line. If I post in one single line then the worm work, but not the way when i enter it with breaks in lines. Does this trow some more light on what I need to do... Look forward to your guidence. Thanks once again Regards Tera.
×
×
  • 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.