Jump to content

satishpoul

Members
  • Posts

    52
  • Joined

  • Last visited

Everything posted by satishpoul

  1. in the above code, for (i = 0; i < tr.length; i++) { // for loop is iterating over the each n every row td = tr.getElementsByTagName("td")[0]; // this line is fetching its first column means 0th column to apply the filter in future.. for your need you also need to fetch next column if (td) { if (td.innerHTML.toUpperCase().indexOf(filter) > -1) { // this line is actually important for filtering the result.. you just have to do some code magic with this line according to your need tr.style.display = ""; } else { tr.style.display = "none"; } } }
  2. use thisprint '<img src="'.$ScanL.'" alt="ScanLine" width="50%" height="50%" border="0" />'; or u can write <img src="<?php echo $ScanL; ?>" alt="ScanLine" width="50%" height="50%" border="0" /> outside php tag
  3. if( $subcat = mysql_fetch_assoc($result) ){ should be like this while($subcat = mysql_fetch_assoc($result)){
  4. if you are trying this from localhost server you must have to do some setting like add port for SMTP and all.. but if u use this on live it will work without any settings..
  5. at the start in php you are checking for $_POST['page_mode'] and if it is not set then ypur are assigning it as a value = ' ' (null/blank) instead of this i wold like suggest if(isset($_POST['$page_mode'])){ $page_mode == $_POST['$page_mode'];if ($page_mode == 'setbio'){ $id = $_SESSION['id'];$find = mysql_query("SELECT bio FROM users WHERE id='$id'");$bio = mysql_fetch_assoc($find);$biotext = $_GET['bio'];$update = db_query("UPDATE users SET bio='$biotext'WHERE id='$id'");}} and check your code by adding echo in each if as well as else loop.. you will get your answer.
  6. i think according to me you just add one more column to your database as status . when your user process for login.. after successful login just update status as a online otherwise default was offline (you can use true/false or 1/0) or copy logged in users data to your new table where you want to store logged in users and same for offline users.
  7. when u submit or click on download js function just like in following examplehttp://www.w3schools.com/php/php_ajax_database.aspand put the validation and alert message whatever u want to set.and if all goes well thensend the data for mailing function in php just like in example from above link ===>> xmlhttp.open("GET","mail.php?q="+str,true);(q as a paramete to send mail) and then in mail.php u can do whatever u want to do.or give him link instead of table in above example.
  8. problem is here action='<?php echo $_SERVER['PHP_SELF'] ?>'> with "" and 'so in action either write "" out side and '' inside or viceversaaction = "<?php echo $_SERVER['PHP_SELF']; ?>"oraction = '<?php echo $_SERVER["PHP_SELF"]; ?>'
  9. i think you required php_ajax just look at this example:http://www.w3schools.com/php/php_ajax_database.asp
  10. what exactly u want after filling details and after clicking download buttonand what exactly u want without filling details and clicking on download button.
  11. try this=><?phpif(isset($_POST['cf_name'],$_POST['cf_email'],$_POST['cf_message'])){$field_name = $_POST['cf_name'];$field_email = $_POST['cf_email'];$field_message = $_POST['cf_message']; $mail_to = 'dedalusonline@yahoo.com';$subject = 'Message from a site visitor '.$field_name;$body_message = 'From: '.$field_name."\n";$body_message .= 'E-mail: '.$field_email."\n";$body_message .= 'Message: '.$field_message;$headers = 'From: '.$field_email."\r\n";$headers .= 'Reply-To: '.$field_email."\r\n";$mail_status = mail($mail_to, $subject, $body_message, $headers);if ($mail_status) { echo "<script>\n"; echo 'var str = \"download\"' . "\n"; echo "document.write(str.link(\"http://www.myshedplans.com/12BY8SHED.pdf\"));\n"; echo "</script>\n";}}else{ echo "<script language=\"javascript\" type=\"text/javascript\">"; echo "alert('Message failed. Please, send an email to gordon@template-help.com');"; echo "window.location = 'contact_page.html';"; echo "</script>";}?>
  12. becouse your output is Dec not Decmber so specify condition for Dec also
  13. you given url and i dont think there is any problem. all the div's and images are very well displayed.
  14. thankx again everybody who replyed on here.i am gonna refer these links http://coursesweb.ne...ery/jquery-ajax http://jsfiddle.net/YXMPn/ for my concept. and if u also have any other links to refer please post here.
  15. yes Birbal thankx a lot man i get the entire concept. just nw waiting for technologies or functions to implement on each process.
  16. okk thankx.. i will make use of this.. and post here results sure..!! thankx all.. will be back here soon
  17. actually here i have two groups of users on my website1 customers2 employers from my company and customer will make inquiry or some activity or u can say send message to usand as soon as he sends message all the employers of my company will get notification on his account. i have not yet decided how i am gonna design it. but want to clear my concept before designing so that i will start implementing this.
  18. see i dont understand why u want to make it as a null.. and still if u really want to make it null my advice is to not to use column date as a data type date. use column date of data type text or varchar and save $etd value in it or null.
  19. so now you still having some problem or u got the solution ?
  20. yes that's what i want to do.. but i will make one special area or div for this alerts and all. so in that area i want to get notification. this area is comman on each page. and now which type of ajax function i will help me. i mean i will search upon it but confuse by which keyword i use to search.
  21. try this one.. no need to use function validation_string($value) directly it will check isset submit means you have submitted value and then it will check for the string. <?php if(isset($_POST['submit'])) { //$username=$_POST['username']; $pattern= "/[a-z]/"; foreach($_POST as $value) { if($value == 'submit') break; if(preg_match($pattern,$value)) { echo $value."OK"; } else { echo $value."Not ok "; } } } ?> <form action="sample.php" method="post" action=""> <fieldset><legend> USER LOGIN</legend> <p><div><label for="username">*USERNAME:</label><input type="text" name="username" value="<?php if(isset($_POST['username'])){ echo htmlentities($_POST['username']); } ?>"/><br /><p></div> <p><div><label for="username">*PASSWORD:</label><input type="password" name="password" /></div></p> <p><div><label for="username">*FIRSTNAME:</label><input type="text" name="firstname" value="<?php if(isset($_POST['firstname'])){ echo htmlentities($_POST['firstname']); } ?>"/><br /><p></div> <p><div><label for="username">*LASTNAME:</label><input type="text" name="lastname" value="<?php if(isset($_POST['lastname'])){ echo htmlentities($_POST['lastname']); } ?>"/><br /><p></div> <input type="submit" name="submit" /></div></p>
  22. yes you can do that using foreach loop foreach($_POST as $pro){ if($pro == 'submit') break; //here $_POST contain your submitted data like username so // use here your function i m using echo echo $pro; } try this
  23. you have not completed bracket or missing ')' in line of if condition.your lineif(preg_match($pattern,$username) make itif(preg_match($pattern,$username))
  24. see in your case p_id is depend on your page and your limit right..means your main condition is limit : (2 in your case.)so if u have 2 or less than 2 products your code will work.. your main problem is for more than two products so see this ==>>> but if you have more than 2 products just add one if condition and set your p_id using following formula.i m considering your $x as p_id.on page 1 $page_num=1 on page 2 $page_num=2 // page number you have to pass in url or in session variables.this is fixed => limit=2 $x=(($limit*$page_num)-$limit); // you just have to use this one simple fomula to get your first product. /*-----above line will give you your 1st product depend on your page for page 1$x = ((2*1)-2) = 0your first product is 0 your first product on this page is 0.here you get two products 0 and 1 by using loops below. for page 2$x = ((2*2)-2) = 2your first product on this page is 2.here you get two products 2 and 3 by using loops below. for page 3$x = ((2*3)-2) = 4your products are 4 and 5. and so on.... */ after getting your first products number ( for page 1 => 0 for page 2 => 2 ) this loop will help you to get two products for($counter=0;$counter<$limit;$count++) { here you are controlling your loops to execute only two times using $count and $limit } or you can use do{ ...... your code; $limit--; }while($limit>0); hope so this will help you..
  25. ok thank you so much.. i will try this and will update my result..
×
×
  • Create New...