-
Posts
1,141 -
Joined
-
Last visited
Posts posted by dropfaith
-
-
whats it currently doing?
<td><input name="name" type="text" <?php if(isset(SESSION['user'])){echo ' value=SESSION['user']} ' ?> id="name" size="50" /></td>
no value set?
<td><input name="name" type="text" value ="<?php if(isset(SESSION['user'])){echo ' value=SESSION['user']} ' ?>" id="name" size="50" /></td>
-
update the script is functional its now sending emails to the server but the server is marking them as spam and refusing to send them out (its a test server any idea how to avoid this issue)
-
<style> body {background:#000;color:#fff;} fieldset {width:650px;border:1px solid #ccc;} legend {text-align:right;color:#f00} </style> <?php #Grab email addresses from MySQL // database configuration $sqlhost = "localhost"; $sqllogin = ""; $sqlpass = ""; $sqldb = ""; $db = mysql_connect($sqlhost, $sqllogin, $sqlpass) or die("Connection to MySQL Failed."); mysql_select_db($sqldb, $db) or die("Could not select database $sqldb"); $sqlquery = "SELECT * FROM emaillist"; $result = mysql_query($sqlquery) or die ("Query failed: " . mysql_error() . " Actual query: " . $query); $numrows = mysql_num_rows($result); for($x=0; $x<$numrows; $x++){ $result_row = mysql_fetch_row($result); $oneemail = $result_row[0]; $emaillist .= $oneemail."\n"; } if ($action == 'send'){ $message = urlencode($message); $message = ereg_replace("%5C%22", "%22", $message); $message = urldecode($message); $message = stripslashes($message); $subject = stripslashes($subject); } ?> <fieldset> <legend>Email Form</legend> <form name="form1" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>" enctype="multipart/form-data"> <table width="60%" border="0"> <tr> <td width="10%"> <div align="left"><font size="-3" face="Verdana, Arial, Helvetica, sans-serif">Your Email:</font></div> </td> <td width="18%"><font size="-3" face="Verdana, Arial, Helvetica, sans-serif"> <input type="text" name="from" value="" size="30"> </font></td> </tr><tr> <td width="10%"> <div align="left"><font size="-3" face="Verdana, Arial, Helvetica, sans-serif">Your Name:</font></div> </td> <td width="41%"><font size="-3" face="Verdana, Arial, Helvetica, sans-serif"> <input type="text" name="realname" value="" size="30"> </font></td> </tr> <tr> <td width="10%"> <div align="left"><font size="-3" face="Verdana, Arial, Helvetica, sans-serif">Reply-To:</font></div> </td> <td width="18%"><font size="-3" face="Verdana, Arial, Helvetica, sans-serif"> <input type="text" name="replyto" value="" size="30"> </font></td> </tr> <tr> <td width="31%"> <div align="left"><font size="-3" face="Verdana, Arial, Helvetica, sans-serif">Attach File:</font></div> </td> <td width="41%"><font size="-3" face="Verdana, Arial, Helvetica, sans-serif"> <input type="file" name="file" size="30"> </font></td> </tr> <tr> <td width="10%"> <div align="left"><font size="-3" face="Verdana, Arial, Helvetica, sans-serif">Subject:</font></div> </td> <td colspan="3"><font size="-3" face="Verdana, Arial, Helvetica, sans-serif"> <input type="text" name="subject" value="" size="30"> </font></td> </tr> <tr valign="top"> <td colspan="3"><font size="-3" face="Verdana, Arial, Helvetica, sans-serif"> <textarea name="message" cols="40" rows="10"></textarea> <br> <input type="radio" name="contenttype" value="plain" checked> Plain <input type="radio" name="contenttype" value="html"> HTML <input type="hidden" name="action" value="send"> <input type="submit" value="Send eMails"> </font></td> </tr> </table> </form> </fieldset> <?php $action=$_POST['action']; if ($action == 'send'){ if (!$from && !$subject && !$message && !$emaillist){ print "Please complete all fields before sending your message."; exit; } $allemails = split("\n", $emaillist); $numemails = count($allemails); #Open the file attachment if any, and base64_encode it for email transport If ($file_name){ @copy($file, "./$file_name") or die("The file you are trying to upload couldn't be copied to the server"); $content = fread(fopen($file,"r"),filesize($file)); $content = chunk_split(base64_encode($content)); $uid = strtoupper(md5(uniqid(time()))); $name = basename($file); } for($x=0; $x<$numemails; $x++){ $to = $allemails[$x]; if ($to){ $to = ereg_replace(" ", "", $to); $message = ereg_replace("&email&", $to, $message); $subject = ereg_replace("&email&", $to, $subject); print "Sending mail to $to......."; flush(); $header = "From: $realname <$from>\r\nReply-To: $replyto\r\n"; $header .= "MIME-Version: 1.0\r\n"; If ($file_name) $header .= "Content-Type: multipart/mixed; boundary=$uid\r\n"; If ($file_name) $header .= "--$uid\r\n"; $header .= "Content-Type: text/$contenttype\r\n"; $header .= "Content-Transfer-Encoding: 8bit\r\n\r\n"; $header .= "$message\r\n"; If ($file_name) $header .= "--$uid\r\n"; If ($file_name) $header .= "Content-Type: $file_type; name=\"$file_name\"\r\n"; If ($file_name) $header .= "Content-Transfer-Encoding: base64\r\n"; If ($file_name) $header .= "Content-Disposition: attachment; filename=\"$file_name\"\r\n\r\n"; If ($file_name) $header .= "$content\r\n"; If ($file_name) $header .= "--$uid--"; mail($to, $subject, "", $header); print "ok<br>"; flush(); } } } ?>
-
changed still the same tho guh maybe if been awake too long to fiqure this out but its the final step of this much larger project im doing
sigh
-
it was thru a second file doing some stuff ive edited it to show what the other does
http://dropfaithproductions.com/Astaroth/eMailer.php
you see the bottom sending email thing at all times for some reason but its showing the amount of records in my test database
<style> body {background:#000;color:#fff;} fieldset {width:650px;border:1px solid #ccc;} legend {text-align:right;color:#f00} </style> <?php If ($action=$_POST['action']){ #Grab email addresses from MySQL // database configuration $sqlhost = "localhost"; $sqllogin = "***"; $sqlpass = "***"; $sqldb = "***"; $db = mysql_connect($sqlhost, $sqllogin, $sqlpass) or die("Connection to MySQL Failed."); mysql_select_db($sqldb, $db) or die("Could not select database $sqldb"); $sqlquery = "SELECT * FROM emaillist"; $result = mysql_query($sqlquery) or die ("Query failed: " . mysql_error() . " Actual query: " . $query); $numrows = mysql_num_rows($result); for($x=0; $x<$numrows; $x++){ $result_row = mysql_fetch_row($result); $oneemail = $result_row[0]; $emaillist .= $oneemail."\n"; } } if ($action=$_POST['action']){ $message = urlencode($message); $message = ereg_replace("%5C%22", "%22", $message); $message = urldecode($message); $message = stripslashes($message); $subject = stripslashes($subject); } ?> <fieldset> <legend>Email Form</legend> <form name="form1" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>" enctype="multipart/form-data"> <table width="60%" border="0"> <tr> <td width="10%"> <div align="left"><font size="-3" face="Verdana, Arial, Helvetica, sans-serif">Your Email:</font></div> </td> <td width="18%"><font size="-3" face="Verdana, Arial, Helvetica, sans-serif"> <input type="text" name="from" value="" size="30"> </font></td> </tr><tr> <td width="10%"> <div align="left"><font size="-3" face="Verdana, Arial, Helvetica, sans-serif">Your Name:</font></div> </td> <td width="41%"><font size="-3" face="Verdana, Arial, Helvetica, sans-serif"> <input type="text" name="realname" value="" size="30"> </font></td> </tr> <tr> <td width="10%"> <div align="left"><font size="-3" face="Verdana, Arial, Helvetica, sans-serif">Reply-To:</font></div> </td> <td width="18%"><font size="-3" face="Verdana, Arial, Helvetica, sans-serif"> <input type="text" name="replyto" value="" size="30"> </font></td> </tr> <tr> <td width="31%"> <div align="left"><font size="-3" face="Verdana, Arial, Helvetica, sans-serif">Attach File:</font></div> </td> <td width="41%"><font size="-3" face="Verdana, Arial, Helvetica, sans-serif"> <input type="file" name="file" size="30"> </font></td> </tr> <tr> <td width="10%"> <div align="left"><font size="-3" face="Verdana, Arial, Helvetica, sans-serif">Subject:</font></div> </td> <td colspan="3"><font size="-3" face="Verdana, Arial, Helvetica, sans-serif"> <input type="text" name="subject" value="" size="30"> </font></td> </tr> <tr valign="top"> <td colspan="3"><font size="-3" face="Verdana, Arial, Helvetica, sans-serif"> <textarea name="message" cols="40" rows="10"><? print $message; ?></textarea> <br> <input type="radio" name="contenttype" value="plain" checked> Plain <input type="radio" name="contenttype" value="html"> HTML <input type="hidden" name="action" value="send"> <input type="submit" value="Send eMails"> </font></td> </tr> </table> </form> </fieldset> <?php if ($action=$_POST['action']){ if (!$from && !$subject && !$message && !$emaillist){ print "Please complete all fields before sending your message."; exit; } $allemails = split("\n", $emaillist); $numemails = count($allemails); #Open the file attachment if any, and base64_encode it for email transport If ($file_name){ @copy($file, "./$file_name") or die("The file you are trying to upload couldn't be copied to the server"); $content = fread(fopen($file,"r"),filesize($file)); $content = chunk_split(base64_encode($content)); $uid = strtoupper(md5(uniqid(time()))); $name = basename($file); } for($x=0; $x<$numemails; $x++){ $to = $allemails[$x]; if ($to){ $to = ereg_replace(" ", "", $to); $message = ereg_replace("&email&", $to, $message); $subject = ereg_replace("&email&", $to, $subject); print "Sending mail to $to......."; flush(); $header = "From: $realname <$from>\r\nReply-To: $replyto\r\n"; $header .= "MIME-Version: 1.0\r\n"; If ($file_name) $header .= "Content-Type: multipart/mixed; boundary=$uid\r\n"; If ($file_name) $header .= "--$uid\r\n"; $header .= "Content-Type: text/$contenttype\r\n"; $header .= "Content-Transfer-Encoding: 8bit\r\n\r\n"; $header .= "$message\r\n"; If ($file_name) $header .= "--$uid\r\n"; If ($file_name) $header .= "Content-Type: $file_type; name=\"$file_name\"\r\n"; If ($file_name) $header .= "Content-Transfer-Encoding: base64\r\n"; If ($file_name) $header .= "Content-Disposition: attachment; filename=\"$file_name\"\r\n\r\n"; If ($file_name) $header .= "$content\r\n"; If ($file_name) $header .= "--$uid--"; mail($to, $subject, "", $header); print "ok<br>"; flush(); } } } echo $numemails; ?>
-
trying to get this working any help right now its connecting properly but not sending anything or telling me why its just resetting the form and doing nothing more
<? If ($action=="mysql"){ #Grab email addresses from MySQL include "conf.php"; if (!$sqlhost || !$sqllogin || !$sqlpass || !$sqldb || !$sqlquery){ print "Please configure mysql.info.php with your MySQL information. All settings in this config file are required."; exit; } $db = mysql_connect($sqlhost, $sqllogin, $sqlpass) or die("Connection to MySQL Failed."); mysql_select_db($sqldb, $db) or die("Could not select database $sqldb"); $result = mysql_query($sqlquery) or die("Query Failed: $sqlquery"); $numrows = mysql_num_rows($result); for($x=0; $x<$numrows; $x++){ $result_row = mysql_fetch_row($result); $oneemail = $result_row[0]; $emaillist .= $oneemail."\n"; } } if ($action=="send"){ $message = urlencode($message); $message = ereg_replace("%5C%22", "%22", $message); $message = urldecode($message); $message = stripslashes($message); $subject = stripslashes($subject); } ?> <form name="form1" method="post" action="" enctype="multipart/form-data"> <br> <table width="100%" border="0"> <tr> <td width="10%"> <div align="right"><font size="-3" face="Verdana, Arial, Helvetica, sans-serif">Your Email:</font></div> </td> <td width="18%"><font size="-3" face="Verdana, Arial, Helvetica, sans-serif"> <input type="text" name="from" value="<? print $from; ?>" size="30"> </font></td> <td width="31%"> <div align="right"><font size="-3" face="Verdana, Arial, Helvetica, sans-serif">Your Name:</font></div> </td> <td width="41%"><font size="-3" face="Verdana, Arial, Helvetica, sans-serif"> <input type="text" name="realname" value="<? print $realname; ?>" size="30"> </font></td> </tr> <tr> <td width="10%"> <div align="right"><font size="-3" face="Verdana, Arial, Helvetica, sans-serif">Reply-To:</font></div> </td> <td width="18%"><font size="-3" face="Verdana, Arial, Helvetica, sans-serif"> <input type="text" name="replyto" value="<? print $replyto; ?>" size="30"> </font></td> <td width="31%"> <div align="right"><font size="-3" face="Verdana, Arial, Helvetica, sans-serif">Attach File:</font></div> </td> <td width="41%"><font size="-3" face="Verdana, Arial, Helvetica, sans-serif"> <input type="file" name="file" size="30"> </font></td> </tr> <tr> <td width="10%"> <div align="right"><font size="-3" face="Verdana, Arial, Helvetica, sans-serif">Subject:</font></div> </td> <td colspan="3"><font size="-3" face="Verdana, Arial, Helvetica, sans-serif"> <input type="text" name="subject" value="<? print $subject; ?>" size="90"> </font></td> </tr> <tr valign="top"> <td colspan="3"><font size="-3" face="Verdana, Arial, Helvetica, sans-serif"> <textarea name="message" cols="60" rows="10"><? print $message; ?></textarea> <br> <input type="radio" name="contenttype" value="plain" checked> Plain <input type="radio" name="contenttype" value="html"> HTML <input type="hidden" name="action" value="send"> <input type="submit" value="Send eMails"> </font></td> <td width="41%"><font size="-3" face="Verdana, Arial, Helvetica, sans-serif"> <textarea name="emaillist" cols="30" rows="10"><? print $emaillist; ?></textarea> </font></td> </tr> </table> </form> <? if ($action=="send"){ if (!$from && !$subject && !$message && !$emaillist){ print "Please complete all fields before sending your message."; exit; } $allemails = split("\n", $emaillist); $numemails = count($allemails); #Open the file attachment if any, and base64_encode it for email transport If ($file_name){ @copy($file, "./$file_name") or die("The file you are trying to upload couldn't be copied to the server"); $content = fread(fopen($file,"r"),filesize($file)); $content = chunk_split(base64_encode($content)); $uid = strtoupper(md5(uniqid(time()))); $name = basename($file); } for($x=0; $x<$numemails; $x++){ $to = $allemails[$x]; if ($to){ $to = ereg_replace(" ", "", $to); $message = ereg_replace("&email&", $to, $message); $subject = ereg_replace("&email&", $to, $subject); print "Sending mail to $to......."; flush(); $header = "From: $realname <$from>\r\nReply-To: $replyto\r\n"; $header .= "MIME-Version: 1.0\r\n"; If ($file_name) $header .= "Content-Type: multipart/mixed; boundary=$uid\r\n"; If ($file_name) $header .= "--$uid\r\n"; $header .= "Content-Type: text/$contenttype\r\n"; $header .= "Content-Transfer-Encoding: 8bit\r\n\r\n"; $header .= "$message\r\n"; If ($file_name) $header .= "--$uid\r\n"; If ($file_name) $header .= "Content-Type: $file_type; name=\"$file_name\"\r\n"; If ($file_name) $header .= "Content-Transfer-Encoding: base64\r\n"; If ($file_name) $header .= "Content-Disposition: attachment; filename=\"$file_name\"\r\n\r\n"; If ($file_name) $header .= "$content\r\n"; If ($file_name) $header .= "--$uid--"; mail($to, $subject, "", $header); print "ok<br>"; flush(); } } } ?>
-
it wont let me log in it created the account i checked phpmyadmin but once thats done it wont log it in..
-
sigh so im trying to set up a decent mailing list thought i had one with vlistlite1.1 but cant seem to get it working anyone have a tutorial or one made i can look at and modify
-
first question is why second if you have an example of this ive never seen it done
-
http://dropfaith.freei.me/liveperformance.php first one is entry second one is sortedlisthave them both echoed out
-
http://dropfaith.freei.me/liveperformance.php
wtf so im playing with this some more and tryed
<?php $sortedlist = array(); while ($list = mysql_fetch_assoc($result)) { $sortedlist[$list['Type']][] = $list; } foreach($sortedlist as $list) { //echo "<pre>"; print_r($list); echo "</pre>"; echo "<h3>{$entry['Type']}</h3>\n"; echo "<ul>\n"; foreach($list as $entry) { //echo "<pre>"; print_r($entry); echo "</pre>"; echo "<li>"; if(empty($entry['Link'])) echo $entry['Name']; else echo "<a href=\"{$entry['Link']}\">{$entry['Name']}</a>"; echo "{$entry['Venue']} {$entry['Year']}{$entry['Type']}"; echo "</li>\n"; } echo "</ul>\n"; }?>
which almost worked but its one off like one down
the top list has no type and then they start with the top ones type over the second list set this is pissing me off its the only thing left on this site and i cant fiqure it out
-
i design mainly in percentages 75 or 80 percent screen width for my main div. but if forced to design on a set size i go with the 1024.800 by 600 is getting less and less used due to excessive screen sizes. im running 1660 right now o my home pc with a 24 inch screen so 800 by 600 leaves a ton of empty space
but yea a scalable percentage based layout is prefered with a min width of 800 id say
-
bump
-
is the full code
<?php error_reporting(E_ALL); include("admin/db_connect.inc.php"); $connection = mysql_connect(HOST, DBUSER, PASS) or die('Could not connect !<br />Please contact the site\'s administrator.'); $db = mysql_select_db(DB) or die('Could not connect to database !<br />Please contact the site\'s administrator.'); // get the info from the db $sql = "SELECT * FROM live"; $result = mysql_query($sql, $connection) or trigger_error("SQL", E_USER_ERROR); $sortedlist = array(); while ($list = mysql_fetch_assoc($result)) { $sortedlist[$list['Type']][] = $list; } foreach($sortedlist as $list) { //echo "<pre>"; print_r($list); echo "</pre>"; echo "<h3>{$list['Type'][0]}</h3>\n"; echo "<ul>\n"; foreach($list as $entry) { //echo "<pre>"; print_r($entry); echo "</pre>"; echo "<li>"; if(empty($entry['Link'])) echo $entry['Name']; else echo "<a href=\"{$entry['Link']}\">{$entry['Name']}</a>"; echo "{$entry['Venue']} {$entry['Year']}"; echo "</li>\n"; } echo "</ul>\n"; } ?>
-
that made the entire page go white
-
somewhere in this chunk of code its messed up and wont echo the text of the h3 everything else works fine
{$list['Type'][0]} is rhe olny thing not being echoed
wonders
$sortedlist = array(); while ($list = mysql_fetch_assoc($result)) { $sortedlist[$list['Type']][] = $list; } foreach($sortedlist as $list) { //echo "<pre>"; print_r($list); echo "</pre>"; echo "<h3>{$list['Type'][0]}</h3>\n"; echo "<ul>\n";
-
yea without refreshing its a javascript issue i think my quick tag should do the trick tho
-
<div onclick="changeText(this)">some text</div>
then the js
function changeText(currentElement){
currentElement.firstChild.data="new text";
}
-
Array ( [0] => Array ( [id] => 2 [Year] => ert [Name] => ert [Link] => rt [Type] => ert [Venue] => ert ) )
http://dropfaith.freei.me/liveperformance.php
there the display
-
-
overall i like the concept and design honestly.
as stated the links in the header are a bit hard to read maybe a shade or 2 darker would work better without losing the color scheme your working on.
also the center issue it looks too right heavy i didnt check your code cause you stated it was in tables and you are working on a div version but when you do you should properly center it with
margin:0 auto; on a container div
-
nope still the same thing i had with that. it need to echo the type thru a loop like say theres 20 results in 5 groups
H3 group 1
somecrapi
more
H3 group 2
so on and so forth
http://dropfaith.freei.me/liveperformance.php is a test site for now if you look its grouping them correctly but the headers wont echo out which confuses me
-
sorry to cross forum post a link but http://www.codingforums.com/archive/index.php/t-163714.html
might help you out a bit
-
i got this all working but the headings arent echoing to the browserupon checking source for the page
<h3></h3> are echoed out but the data is not any ideas why?
<?php include("admin/db_connect.inc.php"); $connection = mysql_connect(HOST, DBUSER, PASS) or die('Could not connect !<br />Please contact the site\'s administrator.'); $db = mysql_select_db(DB) or die('Could not connect to database !<br />Please contact the site\'s administrator.'); // get the info from the db $sql = "SELECT * FROM live"; $result = mysql_query($sql, $connection) or trigger_error("SQL", E_USER_ERROR); $sortedlist = array(); while ($list = mysql_fetch_assoc($result)) { $sortedlist[$list['Type']][] = $list; } foreach($sortedlist as $list) { //echo "<pre>"; print_r($list); echo "</pre>"; echo "<h3>{$list['Type']}</h3>\n"; echo "<ul>\n"; foreach($list as $entry) { //echo "<pre>"; print_r($entry); echo "</pre>"; echo "<li>"; if(empty($entry['Link'])) echo $entry['Name']; else echo "<a href=\"{$entry['Link']}\">{$entry['Name']}</a>"; echo "{$entry['Venue']} {$entry['Year']}"; echo "</li>\n"; } echo "</ul>\n"; } ?>
text-indent inside p, remove from image
in CSS Help
Posted