Jump to content

ronnie88

Members
  • Posts

    153
  • Joined

  • Last visited

    Never

Everything posted by ronnie88

  1. So you mean like this?: function send_mail($from, $to, $subject, $body_mail, $headers) { require_once 'smtp.php'; $query = "SELECT * FROM support_config WHERE ID = '1'"; $req = mysql_query($query) or die("<B>Error ".mysql_errno()." :</B> ".mysql_error().""); $row = mysql_fetch_array($req); $to = stripslashes($to); $smail = $row['smail']; $host = $row['smtp_host']; $port = $row['smtp_port']; $user = $row['smtp_user']; $pass = $row['smtp_pass']; $auth = $row['smtp_auth']; $subject = stripslashes($subject); $body_mail = stripslashes($body_mail); if ($smail==1){ mail($to, $subject, $body_mail, $headers); } else { $headers = $headers."To: $to\r\nSubject: ".$subject."\r\n"; if (! ($smtp = new Net_SMTP($host,$port))) { die("Unable to instantiate Net_SMTP object\r\n"); } if (PEAR::isError($e = $smtp->connect())) { die($e->getMessage() . "\r\n"); } if ($auth==1){ if (PEAR::isError($ea = $smtp->auth($user, $pass ))) { die($ea->getMessage() . "\r\n"); } } if (PEAR::isError($smtp->mailFrom($from))) { die("Unable to set sender to <$from>\r\n"); } if (PEAR::isError($res = $smtp->rcptTo($to))) { die("Unable to add recipient <$to>: " . $res->getMessage() . "\r\n"); } if (PEAR::isError($smtp->data($headers . "\r\n" . $body_mail))) { die("Unable to send data\r\n"); } $smtp->disconnect(); } } ?> It still doesnt work like this Thanks, Ronnie
  2. all you need to do is use is mysql's where attribute. search on the board
  3. your gonna want to learn some mysql to.... but start with some simple stuff like I like to start from the back to the front first make your admin panel make login area for you then make the post a new topic a good thing you might want to do is download a full already done blog script and learn from that.
  4. went there it shouldn't have to upgrade I'm using godaddy..
  5. I'm having a problem When I try to register and it sends mail I get this error: Warning: mail() [function.mail]: SMTP server response: 451 See http://pobox.com/~djb/docs/smtplf.html. in D:\Hosting\4599506\html\support\inc\functions.php on line 695 and here is that area of that file. function send_mail($from, $to, $subject, $body_mail, $headers) { require_once 'smtp.php'; $query = "SELECT * FROM support_config WHERE ID = '1'"; $req = mysql_query($query) or die("<B>Error ".mysql_errno()." :</B> ".mysql_error().""); $row = mysql_fetch_array($req); $to = stripslashes($to); $smail = $row['smail']; $host = $row['smtp_host']; $port = $row['smtp_port']; $user = $row['smtp_user']; $pass = $row['smtp_pass']; $auth = $row['smtp_auth']; $subject = stripslashes($subject); $body_mail = stripslashes($body_mail); if ($smail==1){ mail($to, $subject, $body_mail, $headers); } else { $headers = $headers."To: $to\nSubject: ".$subject."\n"; if (! ($smtp = new Net_SMTP($host,$port))) { die("Unable to instantiate Net_SMTP object\n"); } if (PEAR::isError($e = $smtp->connect())) { die($e->getMessage() . "\n"); } if ($auth==1){ if (PEAR::isError($ea = $smtp->auth($user, $pass ))) { die($ea->getMessage() . "\n"); } } if (PEAR::isError($smtp->mailFrom($from))) { die("Unable to set sender to <$from>\n"); } if (PEAR::isError($res = $smtp->rcptTo($to))) { die("Unable to add recipient <$to>: " . $res->getMessage() . "\n"); } if (PEAR::isError($smtp->data($headers . "\r\n" . $body_mail))) { die("Unable to send data\n"); } $smtp->disconnect(); } } ?> Thanks, Ronnie
  6. can someone tell please whats going on here http://sup-clan.com/indexorig.php it doesn't open in I.E. well the index but everything else opens fine..... open it with firefox opens fine when you refresh it a couple times it sometimes opens in i.e. but with numerous images missing any ideas?
  7. why don't you just chmod the file he uploads?? so it can't run. Or don't allow the extension he is uploading...thats why a lot of people only allow zips and such.
  8. if your talking about a plain form creator I know there is one in Fantastico in my cPanel
  9. try turning off UAC Control Panel ==> Classic View ==> User Accounts ==> Turn User Account Control Off ==> restart EDIT: this will turn off all the continue junk and allow you to freely move
  10. not in php, well not that I know of
  11. sure just have to edit your db connection from localhost to the ip you want and insert into the forum table. i.e. <?php /** * Connect to the mysql database. */ $conn = mysql_connect("IP_OF_THE_SERVER", "username", "password") or die(mysql_error()); mysql_select_db('database_name', $conn) or die(mysql_error()); ?>
  12. $to = "email1@email.com,email2@email.com"; let me know if that works any better 4 u, should.
  13. don't use multiple variables use commas in one variable
  14. lets see client.php heres what I made awhile back <?php // make sure all needed information is provided if($_POST['username'] && $_POST['pass'] && !($_GET['failed'] == "1")) { $port = $_POST['port']; // sets the port number to login to // Get the protocol to use for this connection switch($port) { case '2082': // cPanel case '2086': // WHM case '2095': // Webmail $protocol = 'http://'; break; case '2083': // Secure cPanel case '2087': // Secure WHM case '2096': // Secure Webmail $protocol = 'https://'; break; } // Build the URL $redirectlocation = $protocol.'websites4clans.com'.':'.$port.'/login/?user='.$_POST['username'].'&pass='.$_POST['pass'].'&failurl='.$_POST['failurl']; header ("Location: ".$redirectlocation); // Send URL } else { $error = 1; header ("Location: ".$_POST['failurl']); // Send URL if all neede information is not provided } ?> <form action="cpanelLogin.php" method="POST"> <div align="justify"> <?php // Show an error if the login failed if(($_GET['failed'] == "1") or ($error == 1)){ echo '<font color="#FF0000">Your login attempt failed!</font><br />'; } ?> Username: <input type="text" name="username" value="" size="20" /> <br /> Password: <input type="password" name="pass" value="" size="20" /> <br /> <?php // This failurl allows cPanel to redirect back to this site echo '<input type="hidden" name="failurl" value="http://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'].'?failed=1">'; ?> Options: <select name="port"> <option value="2082">cPanel </option> <option value="2083">Secure cPanel </option> <option value="2095">Webmail</option> <option value="2096">Secure Webmail</option> </select> <br /> <input type="submit" value="Login" /> </div> </form></td>
  15. thanks just had that idea right after i finished posting
  16. Here is my form <form action="insertsup.php" method="post"> <br><tr><td>UserName:</td><td><input type="text" name="username2" maxlength="25"></td> <tr><td>Email:</td><td><input type="text" name="email" maxlength="25"></td><br> <tr><td>Phone:</td><td><input type="text" name="phone" maxlength="25"></td><br> <tr><td>PayPal Email:</td><td><input type="text" name="paypal" maxlength="25"></td><br> <input type="hidden" name="order" value="ORDERSUP" /> <tr><td><input name="add" type="submit" id="add" value="Submit and go to billing"></td></form></tr> and insertsup.php <?php session_start(); include 'database.php'; $name = $_POST['username2']; $email = $_POST['email']; $phone = $_POST['phone']; $paypal = $_POST['paypal']; $order = $_POST['order']; $characters = $_POST['characters']; mysql_query("insert into orders(username2, email, phone, paypal, order, size, theme, characters) values('$name', '$email', '$phone', '$paypal', '$order', '', '', '')"); header('Location: http://www.greatdiscountedgames.com/site_flash/ordersent1.html'); ?> when i do a mysql error i get this: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'order, size, theme, characters) values('Ronnie', 'millers_r@msn.com', '123456789' at line 1 I know it has something to do with the hidden field.. any help greatly appreciated EDIT: maybe a mysql reserved word?
  17. like thorpe said instead of the result like you have right now replace it with this and it should give you an error to the cause of why its not inserting $result = mysql_query($qry,$db) or die(mysql_error() . $qry);
  18. if your running php on a nix box using w/ a fax or modem u can use HylaFax http://www.hylafax.org/content/Main_Page free btw and use this script: // Create a temp file to store the message in $tmpfname = tempnam ("/tmp", "FOO"); $fp = fopen($tmpfname, "w"); fwrite($fp, $this->message); fclose($fp); // Call Sendfax: // Note the "0,," hack to get an outside line $command = "/usr/local/bin/sendfax -n -d \"0,,".$phone_number."\" -f \"From Name, Number\" $tmpfname"; exec($command); unlink($tmpfname); if you dont wanna go that way: you can use a service. such as: http://www.interfax.net/en/dev/webservice/
  19. try this I don't know if it works but hey worth a shot, also wrong forum <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,24" width="766" height="433"> <param name="movie" value="Header.swf"> <param name="quality" value="high"> <param name="menu" value="false"> <!--[if !IE]> <--> <object data="Header.swf" width="766" height="433" type="application/x-shockwave-flash"> <param name="quality" value="high"> <param name="menu" value="false"> <param name="pluginurl" value="http://www.macromedia.com/go/getflashplayer"> FAIL (the browser should render some flash content, not this). </object> <!--> <![endif]--> </object>
  20. forgot another code check it again also don't forget to start your session EDIT: if you look at the bottom of the second code $logged_in = checkLogin(); when it asks for $logged_in it will run the function checklogin checklogin then checks if the cookies are set
  21. First off welcome to PHPFreaks! function displayLogin(){ global $logged_in; if($logged_in){ echo "<h1>Logged In!</h1>"; echo "Welcome <b>$_SESSION[username]</b>, you are logged in. <a href=\"logout.php\">Logout</a>"; } else{ ?> <h1>Login</h1> <form action="" method="post"> <table align="left" border="0" cellspacing="0" cellpadding="3"> <tr><td>Username:</td><td><input type="text" name="user" maxlength="30"></td></tr> <tr><td>Password:</td><td><input type="password" name="pass" maxlength="30"></td></tr> <tr><td colspan="2" align="left"><input type="checkbox" name="remember"> <font size="2">Remember me next time</td></tr> <tr><td colspan="2" align="right"><input type="submit" name="sublogin" value="Login to my account"></td></tr> <tr><td colspan="2" align="left"><b><a href="register.php">Join</a></b></td></tr> </table> </form> <? } } ?> function checkLogin(){ /* Check if user has been remembered */ if(isset($_COOKIE['cookname']) && isset($_COOKIE['cookpass'])){ $_SESSION['username'] = $_COOKIE['cookname']; $_SESSION['password'] = $_COOKIE['cookpass']; } /* Username and password have been set */ if(isset($_SESSION['username']) && isset($_SESSION['password'])){ /* Confirm that username and password are valid */ if(confirmUser($_SESSION['username'], $_SESSION['password']) != 0){ /* Variables are incorrect, user not logged in */ unset($_SESSION['username']); unset($_SESSION['password']); return false; } return true; } /* User not logged in */ else{ return false; } } $logged_in = checkLogin(); and not hacker so I don't know lol
  22. think this is a javascript or ajax question.. I think
  23. get rid of the <tr> should stop going in a column
  24. what is the variable input for $id? should say something like $id= something sounds like $id isn't working since its outputting blank make sure you set your session
×
×
  • 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.