Jump to content

vaibhavs

Members
  • Posts

    13
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

vaibhavs's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi, No settings in Gmail >> Settings. I need to know if imap_delete & imap_purse work with GMail. At another forum, I am advised to move the mail into GMail/Trash folder to delete the emails. But I have no clue how to do this in PHP. Please help!! Thx Vai
  2. Hi, I have written a php script which will delete certain emails from Gmail using IMAP protocol. But the script is unable to delete emails. After I run the script, the emails are removed from the INBOX, but when I click on ALL EMAILS, I see the deleted emails available there. I want the emails to be totally deleted. I have IMAP, POP3 enabled. All emails were received after the POP3 was enabled. This is my script: <?php $mailbox = imap_open("{imap.gmail.com:993/imap/ssl}INBOX", "xxx@gmail.com","xxx"); // Check messages $check = imap_check($mailbox); print("Number of messages : " . $check->Nmsgs . "\n\n\n"); for($d=1; $d<=$check->Nmsgs; $d++) { $header = imap_header($mailbox, $d); if ((preg_match('/night/i', $header->Subject))) { imap_delete($mailbox, $d); } } $delete = imap_expunge ($mailbox); imap_close($mailbox); echo "DONE"; ?> Please help, I have tried all possible options and I have researched the net extensively. I am almost ready to give up. I await some help pls. Thx Vai
  3. Short tags are working. Sessions are working. The $_SESSION['client_name'] is displaying. Can you throw some more light on <body unload""> How can I control browser closing fully. I have tried from multiple XP PCs and its same everywhere. More help pls ?? Thx
  4. Thats not happening with my code. I open index.php (as coded above). I login successfully. Then I close the browser window. Then I open a new browser instance & go to list.php and I am able to access it successfully. I have this at the top of my list.php <? session_start(); if($_SESSION["client_name"] == ''){ header("location:index.php"); } ?> What should I do to correct this ? Please help. Thx Vai
  5. How does yahoo mail (or other such websites) do it ?? If I close my browser window and open a new instance, yahoo shows me the login page.
  6. Hi, I have the following code in my index.php Main purpose: I have a logout routine which works fine, but I wish to kill the session when any user closes the browser window without logging-out. I believe this can be achieved using cookies in conjunction with sessions. I wish to incorporate cookies into this page so that the session is killed as soon as the user closes the browser window. Requesting forum members to help help me with the code. I tried some combinations but failed! <? $db_name = "mydb"; $db_user = "mydbuser"; $db_pass = "mydbuserpass"; session_start(); if($_POST['submit'] == 'Submit') { $db=mysql_connect ("localhost", $db_user, $db_pass) or die ('Cannot connect to MySQL: ' . mysql_error()); mysql_select_db ($db_name) or die ("Sorry, database Problems.Please try again."); $username = $_POST['username']; $query = "select client_name, client_email from login where username = '".$username."' and password= '".$_POST['password']."'"; $result = mysql_query($query); $value = mysql_fetch_array($result); $num_rows = mysql_num_rows($result); if($num_rows > 0) { $_SESSION["client_name"] = $value['client_name']; $_SESSION["client_email"] = $value['client_email']; header("location:list.php"); } else { echo "<div align='center'><font color='#FF0000' face='Verdana' size='1'>Invalid Username or Password!!</font></div>"; } } ?> <html> <head> <title>Login </title> </head> <body onLoad="document.forms[0].elements[0].focus()"> <div align="center"> <center> <br> <b><font face="Verdana" color="#FF0000" size="4">Login:</font></b> <form name="login" action="<?php $_SERVER["PHP_SELF"] ?>" method="post"> <table border="1" cellpadding="4" cellspacing="4" style="border-collapse: collapse" bordercolor="#F0F0F0" width="293"> <tr> <td width="290" colspan="2" bgcolor="#F0F0F0"><b> <font size="2" face="Verdana">Login</font></b></td> </tr> <tr> <td width="88"><b><font size="2" face="Verdana">Username</font></b></td> <td width="202"><font face="Verdana"> <input type="text" name="username" size="20"></font></td> </tr> <tr> <td width="88"><b><font size="2" face="Verdana">Password</font></b></td> <td width="202"><font face="Verdana"> <input type="password" name="password" size="20"></font></td> </tr> <tr> <td width="293" colspan="2" align="center"><input type="submit" value="Submit" name="submit"> <input type="reset" value="Reset" name="B2"></td> </tr> </table> </center> </div> </form> </body> </html>
  7. Hi, I have a unique problem. Please help! I have a folder which contains 300+ images (captured from a Webcam). I want to create a scritp which will show these images in quick succession (preferably without reloading the whole page). Like an old age animation (filcker book). How Can I do this ?? Thx for all tips and codes. regards, Vai
  8. Yes fenway. I need to play a bit with DIVs. Show DIV when the page is Loading and hide when the page has fully loaded. Can you help me on this a bit. Thank you in anticipation. Cheers, Vai
  9. Any other solution? MysqlDump >> FTP >> Import data etc? Thx Vai
  10. Hi, I have an HTML page which is a bit huge (almost 50KB). On a slow internet connection it takes a while to load the page (about 7-10 sec). I would like to display a small splash screen with a message like "Loading page pls wait) as soon as the page is requested and then this window automatically closes when the page is fully loaded. Requesting for pointers / sample scripts using javascript / DHTML / CSS etc. Thank you in advance. regards, Vai
  11. Hi, I am sure this question must have been asked a number of times, but I could not locate a suitable solution. I believe I am unable to find the exact query string for search :( I have 2 Shared hosting accounts with 2 different hosting companies (Linux-MySQL-CPanel). I wish to duplicate a DB (all tables) from Server-1 to Server-2 (Incremental mode to save on b/w). Since it is a Shared Hosting, I have limited access rights (no Shell). Is this possible? Please suggest some solution. Thank you all. With kind regards, Vai
  12. Hi, I have a script which outputs a large data (about 50 rows with 30 column per row). I have already done pagination. I wish to implement 2 logics to make he output faster. (1) Send the data "compressed" to the browser. (2) Display records row by row instead of all rows at a time. Thank you for the help and pointers. regards Vai
  13. Hi, I am sure this must have been discussed many times before, but I could not get much info upon searching. I am writing simple scripts to Add / Delete / Modify records in MySQL. Special characters like single quotes, double quotes, back slash, front slash, dollar etc cause a havoc when interacting with MySQL. What is the best way to handles these characters (and other characters which I have missed above) such that they are displayed correctly when viewing, adding & modifying records. All suggestions / examples / pointers are thanked in advance. Thx. regards, Vai
×
×
  • 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.