Jump to content

ansarka

Members
  • Posts

    128
  • Joined

  • Last visited

    Never

Everything posted by ansarka

  1. it may be a six text from one user consider if your web page is having more than 1000 users at a time so the server will get 1000 request every one second you can chk the status of change , and you can always do a condition chk before updating the page
  2. using ajax is good when you want to refresh a portion of webpage . but i dont agree with you to update the content every one secoudn , becuase it will increase the usage of band width .
  3. when you click the link go to a page where you can write code to delete the section form this page redirect to actual page you want to go that is in btween one page come but user dosent really notice that eg you are in my.php from here you click logout.php when you click logout.php you should delete the section and take the user to a thankyou.html so in logout link take the user to logout.php write a code to delete session . in logout.php wiret the code header("Location: thankyou.html") this will take the user to thankyou.html
  4. ??? ??? ??? what i understand from your question is you want your url to be in .html and internally you want to call a php page is it? if my understaing is correct you hv to use the .htacces file to define some rules to call a php page internally when you execute a html page please go through the url rewrite using .htaccess in php i dont think this attitude is good when you are in a php or any other open source supported programmer
  5. On login page you have to register some session $_SESSION['uid']=$userid; <?php require_once('auth.php'); if(!$_SESSION['uid']) { header("Location: login.php"); //if not logged in dont allow to view th page exit(); } ?> <?php $page_title = 'Member Index'; @ require_once ('../inc/head.php'); ?> <link href="loginmodule.css" rel="stylesheet" type="text/css" /> <h1>Welcome to Members' area!</h1> <?php if($_SESSION['uid']) { ?> <a href="members/member-profile.php">My Profile[/url] | <a href="members/logout.php">Logout[/url] <?php } ?> <p>This is a password protected area only accessible to members. </p> </div></div> <?php @ require_once ('../inc/leftnav.php'); @ require_once ('../inc/rightnav.php'); @ require_once ('../inc/foot.php'); ?> ;)
  6. on display portion of the link check weather logged in or not , by chking the section
  7. Try this code ;) $to = "darrenpaulazzopardi[at]@hotmail.com"; $subject = "Your Free sample order"; $content = "sample:\n Thank you for your interest in our productTEST. Your sample will be despatched shortly"; $header = "From: DARREN@.com\nReply-To: dazzclub@yahoo.co.uk\n"; //spacer mail($to, $subject, $content, $header); [code] while writing the header section of mail you hv to put \r\n if your server is windows , if your server in linux you hv to pu tonly \n change [b]DARREN@.com\r\nReply-To:[/b] TO [b]DARREN@.com\nReply-To:[/b] [/code]
  8. $query = "SELECT count(*) as counter FROM user WHERE id not in (" . $seenIds . ") ORDER BY RAND() LIMIT 1"; $result = mysql_query($query); $row_number= mysql_fetch_array($result); if($row_number['counter'] > 0) { $seenIds = ''; $query = "SELECT * FROM user WHERE 1 ORDER BY RAND() LIMIT 1"; $result = mysql_query($query); } while($row=mysql_fetch_array($result)) { echo $row['name']; echo $row['age']; }
  9. "SELECT * FROM user WHERE id not in (" . $e . ")"?
  10. only a note to add is your server windows or linux if you are using windows server in headers you have to put \r\n if you are using linux server in headersyou have to put \n only
  11. <?php if ($path == "http://www.sitename.com/wp") { define('WP_USE_THEMES', false); } else { define('WP_USE_THEMES', false); require('./wp/wp-blog-header.php'); } ?>
  12. in the insert code are you writing $24 by mistake '$shgarden','$pripark','$shpark','$24','$gym','$furthdetout','$furthdetin','$bath2','$suite2','$shower2','$wc2',
  13. Try below code ;) echo "<form method=\"post\" action=\"'.$_SERVER[REQUEST_URI].'\"><select name=\"auto\"> <option value=\"6000\">Mini Cooper €6.000,-</option> <option value=\"12000\">Opel Astra €12.000,-</option> <option value=\"18000\">Ford Mondeo ST220 €18.000,-</option> <option value=\"24000\">Mercedes 300CE €24.000,-</option> <option value=\"30000\">BMW 325Ci €30.000,-</option> <option value=\"36000\">Dodge Ram SRT-10 €36.000,-</option> <option value=\"42000\">Porsche Cayenne €42.000,-</option> <option value=\"48000\">Bentley Continental GT €48.000,-</option> <option value=\"54000\">Hummer H2 €54.000,-</option> <option value=\"60000\">Rolls-Royce Silver Seraph €60.000,-</option> </select> <input type=\"submit\" value=\"Kopen\"></form>";
  14. ;) <?php //define the receiver of the email $to = 'youraddress@example.com'; //define the subject of the email $subject = 'Test HTML email'; //create a boundary string. It must be unique //so we use the MD5 algorithm to generate a random hash $random_hash = md5(date('r', time())); if (DIRECTORY_SEPARATOR== '"\"') { $newLineChar = "\r\n"; //for windows }else { $newLineChar = "\n"; // for linux } //define the headers we want passed. $headers = "From: webmaster@example.com".$newLineChar."Reply-To: webmaster@example.com"; //add boundary string and mime type specification $headers .= $newLineChar."Content-Type: multipart/alternative; boundary=\"PHP-alt-".$random_hash."\""; $message ='<b> Hello sudheep ,how are you</b>'; //send the email $mail_sent = @mail( $to, $subject, $message, $headers ); //if the message is sent successfully print "Mail sent". Otherwise print "Mail failed" echo $mail_sent ? "Mail sent" : "Mail failed"; //define the body of the message. ?>
  15. echo date("Y-m-d h:i:s",strtotime("now")); or $data=date("y-m-d"); echo $data;
  16. i installed command line svn and i am using php and command line execution to connect svn and php
  17. echo '<a href="'.$_SERVER['PHP_SELF'].'?startrow='.($startrow +10).'&zoek='.($zoek).'&searchcriteria='.($searchcriteria).'">Next</a>'; if($startrow <10 ) { echo '<a href="'.$_SERVER['PHP_SELF'].'?startrow=0&zoek='.($zoek).'&searchcriteria='.($searchcriteria).'">Previous</a>'; }else { echo '<a href="'.$_SERVER['PHP_SELF'].'?startrow='.($startrow -10).'&zoek='.($zoek).'&searchcriteria='.($searchcriteria).'">Previous</a>'; }
  18. delete from test where order=2; update test set order=order-1 where order >2; ;) ;)
  19. when you close the browser your session will be destroyed automatically so you cannot track the user by session id if you have any registration you can use that unique user id to track this when a user with id=1 comes you can chk the 4 tables whether all entries are there for id=1 if id is only in table 1 you can say the user you hv filled table 1 continue to table 2
  20. May be below link will help you ;) http://www.phpclasses.org/browse/package/3071.html
  21. //$this->getList() returns an array $item1 = $this->getList(); now $item1 will contain the array you can use $item1[0];
  22. change this code #=================== $password = md5($_POST['password']); $query = mysql_query("select * from users"); while($row = mysql_fetch_array($query)) { #=========================================================== # check if password matches the username #=========================================================== if ($row['password'] != md5($_POST['password'])) { die('the password that was entered is incorrect'); } else { echo "<script>alert('your in');</script>"; } } TO $password = md5($_POST['password']); $query = mysql_query("select * from users where username = '$username' and password='$password'"); while($row = mysql_fetch_array($query)) { #=========================================================== # check if password matches the username #=========================================================== if ($row['password'] != md5($_POST['password'])) { die('the password that was entered is incorrect'); } else { echo "<script>alert('your in');</script>"; } }
  23. ??? ??? ??? ??? $_POST is used for form submitting using POST Method $_GET is used of form submitting with get method and for url variables you can use $_REQUEST to get variables from both methods you cannot get the values (array)of multiple combo box using $_POST you need to use $_REQUEST or $_GET ;)
×
×
  • 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.