Jump to content

suma237

Members
  • Posts

    282
  • Joined

  • Last visited

    Never

Everything posted by suma237

  1. this the path error,unable to read the file . Give full path
  2. object is not created in the file test2.php
  3. please check these links http://forums.asmallorange.com/topic/11501-php-mail-cc-bcc-headers/ http://www.w3schools.com/PHP/func_mail_mail.asp. You need to modify the header to send cc
  4. echo "Thank you for contacting us, we have received your message and we aim to respond your very shortly."; echo $to;die; mail($to, $subject, $body, $mailheader);
  5. <?php echo " <!DOCTYPE HTML> <html> <head> <meta name=\"author\" content=\"MontyTheWebmaster.com\" /> <meta charset=\"ISO-8859-1\" /> <meta http-equiv=\"refresh\" content=\"5;url='Login.php'\"> <title>Admin Area</title>". spAdminLinks()." </head> <body> <div id=\"siteContainer\"> <div id=\"topContainer\"> </div> <div id=\"topMenuContainer\"> <div id=\"topMenu\"> </div> </div> <div id=\"contentContainer\"> <div id=\"mainContent\"> <h1>Incorrect User Name or Password.</h1> <p>You will now be re-directed back to the login area to try again, or <a href=\"Login.php\">click here</a>.</p> </div> <div style=\"clear: both;\"></div> </div> <div id=\"footerContainer\"> </div> </div> </body> </html> "; function spAdminLinks() { return "test"; } ?>
  6. refer this link http://www.gidnetwork.com/b-16.html
  7. <?php $date = '31-01-2011'; $beggin_hour = '13:30'; $end_hour = '14:00'; // Hours define("SECONDS_PER_HOUR", 60*60); // Calculate timestamp $start = strtotime($date." ".$beggin_hour); $stop = strtotime($date." ".$end_hour); // Diferences $difference = $stop - $start; // Hours $hours = round($difference / SECONDS_PER_HOUR, 0, PHP_ROUND_HALF_DOWN); # // Minutes $minutes = ($difference % SECONDS_PER_HOUR) / 60; echo $hours. ":" .$minutes; ?>
  8. before the <div >content,store the value to the variable $page $page=$_GET["page"]
  9. //echo "previousfri would be 28/01/2011 and previousmon would be 24/01/2011."; $d = new DateTime(); $weekday = $d->format('w'); $diff = 7 + ($weekday == 0 ? 6 : $weekday - 1); // Monday=0, Sunday=6 $d->modify("-$diff day"); echo "previousmon". $d->format('Y-m-d') . ' - '; $d->modify('+4 day'); echo "<br>previousfri". $d->format('Y-m-d');
  10. class MathClass{ function add(){ $numargs = func_num_args(); $args = func_get_args(); //echo $args; $sum = 0;$i = 0; for ($i ; $i < $numargs ; $i++){ if(is_integer($i)) $sum += $args[$i]; //is_int(func_get_args($i)) ? $sum += func_get_args($i) : die('Use only numbers'); } return $sum; } }
  11. please check this statement $info = $callerInfo."; ".$commentInfo."; ".$callDetail; echo all the variable before passing to the function .
  12. check the host name,it's mysql connectivity error
  13. $db_host = 'xxxx'; $db_user = 'xxx'; $db_pwd = 'xxx'; $database = 'mx'; mysql_connect($xxxxx,$xxx,$xxxxxx) or die("Can't connect to database"); //change the below code as mysql_connect($db_host,$db_user,$db_pwd) or die("Can't connect to database");
  14. remove the comment and also the space // Put this code in first line of web page.
  15. instead of the code header("location:update2.php"); replace it with ?> <script language='javascript'> window.location.href='update2.php'; </script> <?php ?>
  16. int mysql_num_rows ( resource $result ); check the syntax
  17. if($row['Sex']='Female') { $chk= 'checked';} else { $chk= ''; } write the condition for Male also <input type='radio' <?php echo $chk?> >
  18. function checkedAll(frm,val) { var chkValue = val.checked; var len = frm.elements.length; for(i=0;i<len;i++) { frm.elements[i].checked=chkValue; } } [code] <input type="checkbox" name="checkbox" id="checkbox" class="checkbox" onclick="javascript:checkedAll(this.form,this);"/>
  19. echo $query; $process = mysql_query($query)or die(mysql_error()); please check
  20. $s="F1,F2,F3,F4";$y=explode(',',$s); then use array function to compare
  21. please refer this article http://php.net/manual/en/function.http-build-query.php <?php $post_url = ''; foreach ($_POST AS $key=>$value) $post_url .= $key.'='.$value.'&'; $post_url = rtrim($post_url, '&'); ?> You can then use this to pass along POST data in CURL. <?php $ch = curl_init($some_url); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $post_url); curl_exec($ch); ?>
×
×
  • 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.