Jump to content

pranshu82202

Members
  • Posts

    125
  • Joined

  • Last visited

    Never

Everything posted by pranshu82202

  1. Man that was great ... that was awesome.... Can i do all that stuff with php... I badly want to make such thing.... I googled it and i closed it with empty hands.... I need your help to do all this Thanxxx Waiting for your reply
  2. Now a days i m in my college and Today i came across withe something really interesting. In my college i use internet on a proxy server on which all social networking sites are blocked... And today i got a site http://www.hidemyass.com which bypass all the sites and i am able to do my work on twitter and facebook.. But i am Confused, how these sites work.. ???? Can you guyzz tell me what is the working mechanism of theese kind of the sites ... And tell me is it possible to create something like this in php...
  3. Where the hell php.ini is located. :confused: :confused: :confused: :o :o :confused: :confused: :shrug: :shrug: > >
  4. http://www.phpfreaks.com/forums/index.php?topic=340073.0 Me too unable to send mails :(
  5. Try my working code : $username = $_POST['admin_name']; $userpass = $_POST['admin_pass']; $username = stripslashes($username); $userpass = stripslashes($userpass); $username = mysql_real_escape_string($username); // SQL injection HEALED $userpass = mysql_real_escape_string($userpass); // SQL injection HEALED $sql = "select * from admin where username='$username' and password='$userpass'"; $result=mysql_query($sql); $count=mysql_num_rows($result); if($count==1){ session_start(); // register session for as many variables as you want session_register("admin_name"); session_register("admin_pass"); header("location:members.php"); } else { include "adminlogin.php"; echo "<br>"; echo '<center>'."Wrong Username or Password".'</center>'; } ANd keep HTML and PHP code on separate files.
  6. I am trying to create a mail script to send mails via gmail on my localhost. But every time i get the following error : SMTP Error: Could not connect to SMTP host. Message was not sent.Mailer error: SMTP Error: Could not connect to SMTP host. Here is my code : <?php require("class.phpmailer.php"); // path to the PHPMailer class $mail = new PHPMailer(); $mail->IsSMTP(); // telling the class to use SMTP $mail->Mailer = "smtp"; $mail->Host = "ssl://smtp.gmail.com"; $mail->Port = 465; $mail->SMTPAuth = true; // turn on SMTP authentication $mail->Username = "sender@gmail.com"; // SMTP username $mail->Password = "***********"; // SMTP password $mail->From = "sender@gmail.com"; $mail->AddAddress("reciever@gmail.com"); $mail->Subject = "First PHPMailer Message"; $mail->Body = "Hi! \n\n This is my first e-mail sent through PHPMailer."; $mail->WordWrap = 50; if(!$mail->Send()) { echo 'Message was not sent.'; echo 'Mailer error: ' . $mail->ErrorInfo; } else { echo 'Message has been sent.'; } ?> I am using xampp. And installed PHPMailer_v5.1 in the htdocs folder. ANd i have used my gmail username and password in $mail->Username, $mail->Password. Please heal the issue.
  7. Replace your first four lines : <?php session_start(); if (isset($_SESSION["manager"])) { header("location: index.php"); exit(); } ?> With : <?php session_start(); if (!isset($_SESSION["manager"])) { header("location: index.php"); exit(); } ?> And i think that you have keep the html login page code and php script in the same page, so u need to put your whole php code in the following if statement : if (isset($submit)){ //whole php code } Hope it helped.. Happy Coding
  8. Admin i didnt get you... I think you are saying That i shuld upload file anywhere and in my database i shuld keep the url only.... But where i shuld upload my file???
  9. Dreamweaver does not show the php code in the design (or split) window... You need to some program like xampp And then Proceed with the following steps.. 1. Download xampp (free) and extraxt the contents to root C:/ 2. Open xampp folder and open xampp-control.exe 3. Start apachae and myaql serveics and they shuld turn green. 4. Now go to your browser and type http://localhost and see wether its opening xampp window. 5. If its working then save your .php file in the following directory : C:\xampp\htdocs 6. Now again go to your browse and type in your address bar : http://localhost/abc.php (here abc.php is the name of your file) And it will work if your php code is fine... And your second problem : You can put as many php tag as you can.. For ex. <html> <body> .... <?php // Any Code ?> Your HTML Code <?php //Your Second code ?> </body> </html> HOPE IT HELPS ... Happy CODING
  10. Well i want to store an image file (Or any other like zip etc.) of around 2 MB (or even more) in my mysql database, what should be the column properties for that.... Lonblob is even unsuccessful for this... Please help....
  11. I want to know about upload.. That is what shuld be the column properties of the database table.... And what shuld be the php script... Please help
  12. Dude i edit the .htaccess file and when i tried to upload it it my filezilla says Error.... What shuld i do...
  13. I have hosted all my files (html php and images) to a web hosting server (xtremehost)... When i enter any random url http://mysite.com/dvhinf it redirects me to the page of extremehost error page http://error.xtreemhost.com/404.shtml Instead i want to redirect all to my error page... How shuld i do that....
  14. How can i get a url like ... user.mysite.com using php...
  15. <?php require("class.phpmailer.php"); // path to the PHPMailer class $mail = new PHPMailer(); $mail->IsSMTP(); // telling the class to use SMTP $mail->Mailer = "smtp"; $mail->Host = "ssl://smtp.gmail.com"; $mail->Port = 465; $mail->SMTPAuth = true; // turn on SMTP authentication $mail->Username = "yourusername@gmail.com"; // SMTP username $mail->Password = "yourpassword"; // SMTP password $mail->From = "email address sender"; $mail->AddAddress("email address receiver"); $mail->Subject = "First PHPMailer Message"; $mail->Body = "Hi! \n\n This is my first e-mail sent through PHPMailer."; $mail->WordWrap = 50; if(!$mail->Send()) { echo 'Message was not sent.'; echo 'Mailer error: ' . $mail->ErrorInfo; } else { echo 'Message has been sent.'; } ?> I am using this code to send mails via smtp... But all the time i get the following error SMTP Error: Could not connect to SMTP host. Message was not sent.Mailer error: SMTP Error: Could not connect to SMTP host. Please tell me what shuld i do....
  16. When i use this ... its giving an error... Warning: Cannot modify header information - headers already sent by (output started at /..../...../.......///...) in /...../...../...../abc.php on line 104
  17. their is mistake in the echo part... I am not getting how to write that... Can you help me with the echo... Rest is right
  18. I am using this header... But its showing an error... <?php // Some code header ('location : abc.php?id=echo'.$id.''); // Some code ?> Can you tell me what shuld i write instead... Thanks
  19. Is their any method by which i can get browser info of the client side... I used $_SERVER['HTTP_USER_AGENT'] but it gives Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.112 Safari/534.30 - WHEN I USED CHROME and Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0.1) Gecko/20100101 Firefox/4.0.1 - When i used firefox..... (I just need the browser's name then why its attaching a big string "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0.1) Gecko/20100101" with every name)
  20. Well guyzz this not actualy a question of php......... (sorry for that) i think that this the most active forum regarding web designing and all.... I want to create a panel as in this website http://admissions.ri.edu.sg/#discoverbg You can see that in the bottom right of the webpage... Can you tell me what css and coding i shuld use....
  21. Thanx man... Have any idea how to capture the login location...
  22. Is their any way to get the location where my website is logged in... And how to take the ip of the computer on which my website is logged in.... :shrug: :shrug:
  23. Thanxx gristoi.... It worked successfully ..... :D
×
×
  • 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.