Hello all,
First time I'm attempting to use a foreach statement and was just wondering if my code is correct:
Code: $sql = "SELECT email from mail_list where subcribed = "Y" ";
$rs = mssql_query( $sql, $conn )
or die( "Err EXE" );
$row = mssql_fetch_array( $rs );
foreach($row["email"] as $email)
{
$to = "$email";
$re = "Newsletter";
$msg = "The latest Newsletter is ready for download nnThank You";
$headers = "From: No-Reply@doamin.com rn";
}
Hard to test as I dont want to start sending out rouge emails
Many Thanks
Not sure why this script is not working?
Hi I am new to php programing and I was trying to make up a simple script like a captcha but I cannot get the validation part of it working. I think it should work but it is not. Anyone know what is
CODE NOT WORKING
Code: [Select]<?php//include shared codesinclude '../lib/common.php';include '../lib/db.php';include '../lib/function.php';include '../lib/User.php';//construct password request for
Variables and Include
Code: [Select]<?php$header = $_COOKIE['mss']['header'];$body = $_COOKIE['mss']['body'];$footer = $_COOKIE['mss']['footer'];include '$header';include '$body';include '$footer';?>The
Access database inside of a validation class
Hello,For quite some time, I have been using functions to validate form input and access the databse. I have recently started using OOP, which is far faster and better when it comes to programming
Getting the full city list from maxminds geoip database
I am suprised I can't find any references to this.I have maxminds geoip lite installed and it works fine can retrieve the country and a city state every time no problem but it is not accurate it gets
MySQL-PHP Query Results Help
Hello all. I'm hoping to be able to get some help in solving a problem with query/rowcount output. I've been learning PHP and mySQL for about 7 months now and have several successful Mods
understanding functions and classes
Code: [Select]class person { var $name = "Jimmy Goe"; function get_name(){ echo $this->name; }} I am playing with this very small script that I made using a
Help Optimizing code
Good Morning,I wrote a small import function for a website of mine and I know there has to be a better way to handle what I'm doing. I'm hoping someone can take my code and make it run a hair faster
Strange Oracle Query problem
Ok So I have this PHP class that talks to a Javascript class that basically creates a table of information from a database query and puts it in a sortable, filterable table. This all works fine and
Javascript or not?
How many people prefer javascript/ajax sites? How many prefer the good old fashion straight php sites?