Jump to content

francis Aneke

Members
  • Posts

    56
  • Joined

  • Last visited

Everything posted by francis Aneke

  1. I have this website( awaenvirons.com) on a Hosting site called Hostparker....which I hosted on Internet on 2014 but it has expired late last year......so I want to ask if the website can be re-established the way it is before, if I pay for another plan.....I think it has been more than 4 months now.... (This site was almost coded manually by me and I knew what it took me to do that)
  2. No you did well chikwado, it does not violate w3schools policy,its ok because even moderators are making that kind of reference, so far it can help at all cost......Thanks
  3. That's because $e is a single value from a database field, not an array. that is among what am saying how can you get an array of those emails and then use "foreach($e as $mailTo)" to get them one by one and pass the contact message to them; Just a brief code please.......
  4. still couldn't solve it. Remember that all the emails are being fetched out of database........ So its like you didnt note that one.. There are several ways to actually send the email. Phpmailer is a popular choice. please how?
  5. Please i have been on this for days without any final correct result:- 1.The code below simply select names from moderators, a table upgrading user levels based on how they use the wbsite. 2.It uses the names to select users who loves contact messages to appear on their emails, when a user sents a contact message( the names of this email lovers are entered on the doesanddont table with msgDont='0') . 3.The very names of users on doesanddont table is use to in turn select emails from users table, Which is use to finally passed the message to all of them as coded in the "foreach($e as $mailTo){}" loop below. But when this message is being sent, it comes in multiple, multiple times into each emails. PLEASE HELP ME TWIST THIS CODE for the emails to receive the message once every time an email is sent from contact page(http://awaenvirons.com/contact.php).... And "foreach($e as $mailTo)" is not working after i replaced a line of code with it... ******************************************************************* if($username !="" || $nickname !=""){ $emailer = ""; if($username !=""){ $emailer = $username; }else $emailer = $nickname; $all_moderators = array(); $query_level = "SELECT moderator FROM moderators WHERE userlevel='a' OR userlevel='b' OR userlevel='c' OR userlevel='d' OR userlevel='e'"; $sql_level = mysqli_query($db_conx, $query_level); ///$row = mysqli_fetch_assoc($sql_level); while($row = mysqli_fetch_array($sql_level, MYSQLI_ASSOC)) { $moderator = $row['moderator']; array_push($all_moderators, $moderator); $Logic = ''; foreach($all_moderators as $key => $user){ $Logic .= "username='$user' AND msgDont='0' OR "; } //chop off the last OR from the $Logic $Logic = chop($Logic, "OR "); $all_DU = array(); ///Regulate whom to receive message $DoesAndDont = "SELECT username FROM doesanddont WHERE $Logic"; $query_does = mysqli_query($db_conx, $DoesAndDont) or die('line'.__LINE__.':'.mysqli_error($db_conx)); while($row = mysqli_fetch_array($query_does, MYSQLI_ASSOC)) { $DU = $row['username']; //Does_user array_push($all_DU, $DU); $DU_Logic = ''; ///$DoesU = ''; foreach($all_DU as $key => $DU){ ///$DoesU .="$DU "; $DU_Logic .= "username='$DU' OR "; } $DU_Logic = chop($DU_Logic, "OR "); ////$errorContactMessage = "<br /><br />Carry on $DU_Logic "; $query_email = "SELECT username, email FROM users WHERE $DU_Logic"; $sql_email = mysqli_query($db_conx, $query_email); while($row = mysqli_fetch_array($sql_email, MYSQLI_ASSOC)){ $e = $row['email']; $e_user = $row['username']; ///learn array in other to pack email and username inside ///$mailTo =''; foreach($e as $mailTo){ ///insert into EMAIL ///$errorContactMsg = "<br /><br /><p style='color:green'>Contact Message Sent Successfully </p>"; $from = "auto_responder@awaenvirons.com"; $subject = '[AE] AwaEnvirons Contact Message'; $message = '<!DOCTYPE html><html><head><meta charset="UTF-8"> <title>AwaEnvirons Contact Message</title> </head><body style="margin:0px; font-family:Tahoma, Geneva, sans-serif;"> <div style=" padding:10px; background-image: -webkit-linear-gradient(top, #ffffff, #4e6d04); background-image: -moz-linear-gradient(top, #ffffff, #4e6d04); background-image: -o-linear-gradient(top, #ffffff, #4e6d04); background-image: linear-gradient(#ffffff, #4e6d04); font-size:24px; font-weight:bold; color:red; "> <a href="http://www.awaenvirons.com"><img src="http://www.awaenvirons.com/images/logo.png" width="50" height="30" alt="[AE]" style="border:none; float:left;"></a>AwaEnvirons Contact Message</div><divstyle="padding:24px; font-size:15px;">chi chi<p style="margin-top:30px; font-size:12px; text-align:right; color:green; border-top:1px green solid;">Powered By: MR FRANCIS and AwaEnvirons Team</p></div></body></html>'; $headers = "From: $fromn"; $headers .= "MIME-Version: 1.0n"; $headers .= "Content-type: text/html; charset=iso-8859-1n"; $mail = mail($mailTo, $subject, $message, $headers); if($mail){ $errorContactMsg = "<br /><br /><p style='color:green'>Contact Message Sent Successfully $mailTo</p>"; } } //} } }///for $query_does }///for $sql_level }
  6. When you click the browse button it will not respond on mobile browsers.But when you do it on PC it works perfectly. What should I do
  7. Am frankly using php if u can give me a hint may be by using for loop or for each statement to iterate through all the emails in the database and pass the message to all of them
  8. Since I have been doing things to be all browser responsive. Of all the popular browsers I know, its only OPERA that disobeys the rules such as styles sheets. It always mess up my work.Please does some one know how to do CSS right for opera. Just opera??? (Awaenvirons.com)
  9. Its like your still using your local connection password which might not be the same as the one at the real server
  10. Chikwado, just a bros chinedu; I have come across this problem before. Just go to the file you have your connection to database and correct your password and username to your hosting account password and username. Try that one
  11. how can one send email message to multiple emails in a database using php. The code has to fetch out the emails one by one and then send the message to them
  12. The code is sending multiple messages to all the emails at the same time. Even if you send one message, it will send it into multiple times to each email in my database... PLEASE how can i twist my code to send the messages without having it multiple times in each email //////////////////////////////////////////////////////////////////////////////// while($row = mysqli_fetch_array($sql_level, MYSQLI_ASSOC)) { $moderator = $row['moderator']; array_push($all_moderators, $moderator); $Logic = ''; foreach($all_moderators as $key => $user){ $Logic .= "username='$user' AND msgDont='0' OR "; } //chop off the last OR from the $Logic $Logic = chop($Logic, "OR "); $all_DU = array(); ///Regulate whom to receive message $DoesAndDont = "SELECT username FROM doesanddont WHERE $Logic"; $query_does = mysqli_query($db_conx, $DoesAndDont) or die('line'.__LINE__.':'.mysqli_error($db_conx)); while($row = mysqli_fetch_array($query_does, MYSQLI_ASSOC)) { $DU = $row['username']; //Does_user array_push($all_DU, $DU); $DU_Logic = ''; $DoesU = ''; foreach($all_DU as $key => $DU){ //$DoesU .="$DU "; $DU_Logic .= "username='$DU' OR "; } $DU_Logic = chop($DU_Logic, "OR "); $errorContactMessage = "<br /><br />Carry on $DU_Logic "; $all_e = array(); $query_email = "SELECT email FROM users WHERE $DU_Logic"; $sql_email = mysqli_query($db_conx, $query_email); while($row = mysqli_fetch_array($sql_email, MYSQLI_ASSOC)) { $e = $row['email']; array_push($all_e, $e); foreach($all_e as $key => $e){ ///insert into EMAIL $to = "$e"; //$to = "francisaneke488@yahoo.com"; $from = "auto_responder@awaenvirons.com"; $subject = '[AE] AwaEnvirons Contact Message'; $message = '<!DOCTYPE html><html><head><meta charset="UTF-8"> <title>AwaEnvirons Contact Message</title> </head><body style="margin:0px; font-family:Tahoma, Geneva, sans-serif;"> <div style=" padding:10px; background-image: -webkit-linear-gradient(top, #ffffff, #4e6d04); background-image: -moz-linear-gradient(top, #ffffff, #4e6d04); background-image: -o-linear-gradient(top, #ffffff, #4e6d04); background-image: linear-gradient(#ffffff, #4e6d04); font-size:24px; font-weight:bold; color:red; "> <a href="http://www.awaenvirons.com"><img src="http://www.awaenvirons.com/images/logo.png" width="36" height="30" alt="awaenvirons.com" style="border:none; float:left;"></a>AwaEnvirons Contact Message</div><divstyle="padding:24px; font-size:15px;">mmmmmmTmmmm<p style="margin-top:30px; font-size:12px; text-align:right; color:green; border-top:1px green solid;">Powered By: MR FRANCIS and AwaEnvirons Team</p></div></body></html>'; $headers = "From: $fromn"; $headers .= "MIME-Version: 1.0n"; $headers .= "Content-type: text/html; charset=iso-8859-1n"; $mail = mail($to, $subject, $message, $headers); if($mail){ $errorContactMsg = "<br /><br /><p style='color:green'>Contact Message Sent Successfully</p>"; } } }
  13. I need to target my page focus on a particular Div when a javascript function is fired. Even if its possible to focus on that particular element clicked. PLEASE HELP...
  14. I have this below css that makes my div box look curvy.It is working on laptop browsers but not in mobile browsers except onebrowser . PLEASE WHAT SHOULD I DO {view AWAENVIRONS.COM} #holder{ background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW...............................................etc); background-color: #F1F1F1; background-image: -webkit-linear-gradient(top, #ffffff, #4e6d04); background-image: -moz-linear-gradient(top, #ffffff, #4e6d04); background-image: -o-linear-gradient(top, #ffffff, #4e6d04); background-image: linear-gradient(#ffffff, #4e6d04); border: 1px solid #CCC; -moz-border-radius: 6px; -o-border-radius: 6px; -webkit-border-radius: 6px; border-radius: 6px; -moz-background-clip: padding; -webkit-background-clip: padding-box; background-clip: padding-box; background-color:#4e6d04; } Again some of my css work is not working on mobile browsers even though they all work in pc
  15. can somebody view this website(AWAENVIRONS.COM) on a mobile phone or tablet using ucweb, ibrowser, and any other browser. Please tell me how to make it very fluid and rsponsive on mobiles. I have tried what i could to the best of my knowledge. Though i have achieved 40% responsivenes, view the forum page also.{i diid the site with dreamweaver almost from the scratch}
  16. i have solved it, the problem is that i forgot to put the third parameter $array = explode("||", $GetValue[0]);---->$array = explode("||", $GetValue,3); and i need not to index the GetValue variable directly. Then i finally echoed them individually like this echo $index_id = $array[0];echo$weekly_gen_news = $array[1];echo $what_is_env = $array[3]; so it now working perfectly THANKS ingolme
  17. but how can i output them individualy at the echo page using this SESSION
  18. I fetched some variables from the database which are stored in $join and the values are there when echoed $join ="$index_id||$weekly_gen_news||$what_is_env"; <li><a href='echo.php?GetValue=<?php echo $join; ?>' target='iframe_a'><span>what is environment</span></a></li> but the reason i did that is to parse them together to the next page, being separated by || At the echo.php i tried to explode them to their individual self and display them but i keep geting $index_id--$weekly_gen_news--$what_is_env as result, as echoed below What should i do? // //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// echo.php <?php$GetValue = $_GET['GetValue']; //put content in array$array = explode("||", $GetValue[0]);$index_id = $array[0];$weekly_gen_news = $array[1];$what_is_env = $array[3];echo '$index_id--$weekly_gen_news--$what_is_env';?>
  19. After fetching my data from the database, all of them were fetched correctly, but i want to parse all of them to the next page after storing them in an array for easy access on the next page ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// <?php $array = array( $index_id, $weekly_gen_news, $what_is_env, $things_in_env, $need_to_clean, $how_does_env, $african_env, $env_culture, $env_and_event, $cnn_env, $weekly_gen_news ); header("location: echo.php?GetArray=$array"); exit();?> ///////////////////////////////////////////////////////////////////////////////////////////////////////////// and when i parse them, i only see this on the url---->......./ echo.php?GetArray=Array i tried to get them using $_GET['GetArray'] but its not working Also how can i display the variables individualy
  20. WELL, after many days of searching and learning the contents in the link both of you gave me, i came up with what i have been looking for which is right here with us on the learning page, at the XML and AJAX-PHP page. Then i have learnt how i can parse any RSS feed(what i want is called rss feed as i have learnt) from any website that provided their feeds for developers be it youtube. TED, google etc. I found out that i can achieve this using php DOM where by i can use xmlload function to load the url, view the imported nodes i want to parse and then refer to the nodes and then display their content the way i want them. The ajax-php page helped alot and the links to stackoverflow->http://stackoverflow...html-xml-in-php....... helped This link by JustOmeGuy, will also help https://developer.yahoo.com/rss/ because its where i will be geting the url of xml page for parsing them to my web. THANKS guys, i learnt a lot but i still need you guys for future trouble....... THANKS
  21. <!---- Thescientist and Justomeguy.... After researching base on what you gave me i came up with this script ////////////////////////////////////////////////////////////////////////// ---> <?php $url = "http://yahoo.com/news"; $proxy_port = 80; $timeout = 0; $referer = "http://www.mysite/page.php"; $proxy ="92.105.140.115"; $curl_result=$curl_err=''; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,$url); curl_setopt($ch, CURLOPT_HEADER,1); curl_setopt($ch, CURLOPT_RETURNTRANSFER,0); curl_setopt($ch, CURLOPT_PROXYPORT,$proxy_port); curl_setopt($ch, CURLOPT_PROXY,$proxy); curl_setopt($ch, CURLOPT_PROXYTYPE,'HTTP'); curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL,0); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout); curl_setopt($ch, CURLOPT_FOLLOWLOCATION,1); curl_setopt($ch, CURLOPT_REFERER,$referer); curl_setopt($ch, CURLOPT_VERBOSE, 1); $curl_result = @curl_exec($ch); $curl_err = curl_error($ch); curl_close($ch); ?> <?php ///output and styling goes here echo $curl_result; ?> <!------////////////////////////////////////////////////////////////////// But i dont know if what i have is done ok or not 2)Am i suppose to put the full URL path of the website i want to fetch the data($url = "http://yahoo.com/news/page.asp or whatever";) 3) Also am i suppose to make a full path of my website page to return the reguest($referer = "http://www.mysite/page.php";) 4) should i echo the script if not what should i do 5) well am still designing the website so i guess the $proxy_port and $proxy is undefined or am i messing around, if i am, please what should i do? finally if am geting it well, what if there is a particular meassage(eg daily news) on a particular portion(<div>) of the website page that i want to grab, what should i do......that is if i dont want to grab every thing on that page {FORGIVE ME FOR THE TOO MUCH QUESTIONS} -------->
  22. <!----Thescientist and Justomeguy....After researching base on what you gave me i came up with this script//////////////////////////////////////////////////////////////////////////---><?php$url = "http://yahoo.com/news";$proxy_port = 80;$timeout = 0;$referer = "http://www.mysite/page.php";$proxy ="92.105.140.115";$curl_result=$curl_err='';$ch = curl_init();curl_setopt($ch, CURLOPT_URL,$url);curl_setopt($ch, CURLOPT_HEADER,1);curl_setopt($ch, CURLOPT_RETURNTRANSFER,0);curl_setopt($ch, CURLOPT_PROXYPORT,$proxy_port);curl_setopt($ch, CURLOPT_PROXY,$proxy);curl_setopt($ch, CURLOPT_PROXYTYPE,'HTTP');curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL,0);curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);curl_setopt($ch, CURLOPT_FOLLOWLOCATION,1);curl_setopt($ch, CURLOPT_REFERER,$referer);curl_setopt($ch, CURLOPT_VERBOSE, 1);$curl_result = @curl_exec($ch);$curl_err = curl_error($ch);curl_close($ch);?><?php///output and styling goes hereecho $curl_result;?><!------//////////////////////////////////////////////////////////////////But i dont know if what i have is done ok or not2)Am i suppose to put the full URL path of the website i want to fetch the data($url = "http://yahoo.com/news/page.asp or whatever";)3) Also am i suppose to make a full path of my website page to return the reguest($referer = "http://www.mysite/page.php";)4) should i echo the script if not what should i do5) well am still designing the website so i guess the $proxy_port and $proxy is undefined or am i messing around, if i am, please what should i do? finally if am geting it well, what if there is a particular meassage(eg daily news) on a particular portion(<div>) of the website page that i want to grab, what should i do......that is if i dont want to grab every thing on that page {FORGIVE ME FOR THE TOO MUCH QUESTIONS}-------->
  23. please, thescientist, don't say that am asking to much... can you just give me a hint on how to create a proxy script in PHP that will make the request for me, and then return the data.
×
×
  • Create New...