Jump to content

mysql sharing?


Recommended Posts

hey guys i have a login script that records emails when you register.there is a fonction in the admin panel to send emails.but it does not work.(sever does not support it)

so i installed a newsletter script.is it possible to link the msql file that saves the emails to my newsletter sql?

so when the register the email goes to both scripts.

Edit/Delete Message
Link to comment
Share on other sites

well i have one but the sever is to slow to process the newsletter sit give me  a proxy error all the time .so i have a very good newsletter script that i use .but i would like to take the info from my login script for the newsletter script.
Link to comment
Share on other sites

here is the list email page from the newsletter

    include "connect.php";
    <link rel="stylesheet" href="style.css" type="text/css">
    <center><table border='0'><tr><td valign='top' width=30%>
      include "left.php";
      print "</td>";
      print "<td valign='top' width=70%>";
      print "<table class='maintable'><tr class='headline'><td><center>List email addresses in ABC order</center></td></tr>";
      print "<tr class='mainrow'><td>";
      $order="SELECT * from m_list where validated=1 order by address ASC";
      $order2=mysql_query($order) or die(mysql_error());
      print "<font color='#$fontcolor'>Page:</font> ";
        print "<A href='list.php?start=$prev'><<</a> ";
            print "<A href='list.php?start=$d'>$g</a> ";
        print "<A href='list.php?start=$next'>>></a> ";
      print "<center><table class='maintable'><tr class='headline'><td>Address</td><td>Delete</td></tr>";
      $getaddress="SELECT * from m_list where validated='1' order by address ASC limit $start, 20";
      $getaddress2=mysql_query($getaddress) or die("Could not get address");
          print "<tr class='mainrow'><td>$getaddress3[address]</td><td><A href='deleteadd.php?ID=$getaddress3[mailid]'>Delete</a></td></tr>";
      print "</table>";
      print "</td></tr></table>";


and here is the page of members email

include 'config.php';

list($cookie, $tmpname) =
split("!", $_COOKIE[auth], 2);

if($cookie == "fook"){

$connection = mysql_connect($hostname, $user, $pass)
or die(mysql_error());
$db = mysql_select_db($database, $connection)
or die(mysql_error());

$sqlcheckaccount = "SELECT username FROM $userstable
WHERE username = '$tmpname'";

$resultcheckaccount = mysql_query($sqlcheckaccount)
or die ("Couldn't execute query.");
$numcheckaccount = mysql_num_rows($resultcheckaccount);
if($numcheckaccount == 0){
echo "Error, Username doesnt exist.";

$sql = "SELECT * FROM $userstable ORDER BY username";

$result = mysql_query($sql)
or die ("Couldn't execute query.");

$num_rows = mysql_num_rows($result);
echo "<font face=\"Arial\" size=\"2\">Below is a list of members which have registered at letitring.info";
echo "<br> Total members: $num_rows";
echo "<br><table border=\"1\" cellspacing=\"1\" cellpadding=\"3\">";
echo "<tr> <th><font face=\"Arial\" size=\"2\">Username</th> <th><font face=\"Arial\" size=\"2\">Email</th> <th><font face=\"Arial\" size=\"2\">Profile</th> </font></tr>";
while($row = mysql_fetch_array( $result )) {

echo "<tr><td><font face=\"Arial\" size=\"2\">";
echo $row['username'];
echo "</td><td><font face=\"Arial\" size=\"2\">";
echo $row['email'];
echo "</td>";
echo "<td><a href=\"viewprofile.php?name=$row[username]\"><font face=\"Arial\" size=\"2\">View Profile</a></td>";
echo "</tr>";
echo "</table></font>";

} else {
echo "Error, You have to be logged in to view this page.";
echo "<br>Click <a href=\"login.php\">here!</a> to login.";
were should i slide it in and what should i put ?
it is the newsletter script that i will use.
Link to comment
Share on other sites


include ('mysql.php');
$name = $_POST[name];
$text = $_POST[text];
$query = Mysql_query ("SELECT email FROM members");
$count = mysql_num_rows($query);
for ($i=0;$i<$count;$i++){

$to_all = MySQL_Result($query, $i, "email");
$mail = mail("$to_all", "Message to all members from $name",
"Od koho(nickname) : $name
Text              : $text ");
if ($mail){echo "Your massage to $to_all has been sent!<br>";}
elseif (!$mail){echo "Your massage to $to_all has NOT been sent!<br>";}
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • 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.