Here is a script that you could try:

http://stackoverflow.com/questions/51054/batch-file-to-delete-files-older-than-n-days

Or you could opt for powershell

i would suggest you scheduled tasks

That is because your code is upper casing the first letter, then making them all lower case

Swap these around:

ucwords(strtolower(

to be:

strtolower(ucwords(

http://php.net/manual/en/function.ucwords.php

while($row = mysql_fetch_array($result))
{
    $txtname = ucwords(strtolower($row['First.Name'])) . '-' . ucwords(strtolower($row['Last.Name'])); 
    $newstring = str_replace(" ", "-", $txtname);

    echo'<div class="cat-post-desc"><h3>
        <a href="' . $newstring . '.php">' . $row['First.Name'] . ' ' . $row['Last.Name'] . '</a>
        </h3><p></p></div>';

} /** <-- You need to close your while loop

And include the $txtname & $new string in your loop

This line:

$txtname = "'. ucwords(strtolower($row ['First.Name'])) . '-'. ucwords(strtolower($row ['Last.Name'])) . "; 

should be:

$txtname = ucwords(strtolower($row['First.Name'])) . '-' . ucwords(strtolower($row['Last.Name']));

@cmps,

Sorry i think i had miss undrstood what you were after ^_^.

prestashop is good for ecommerce - in my opion :)

could you not use a pop out window?

Where is your database connection?

Or include the file that has the function :)

Has your first Parse error gone?

Did you change, as has been advised, the short tags?

<td width="10%"><? echo $rows['id']; ?></td>
<td width="30%"><? echo $rows['name']; ?></td>
<td width="30%"><? echo $rows['lastname']; ?></td>
<td width="30%"><? echo $rows['email']; ?></td>

To be:

<td width="10%"><?php echo $rows['id']; ?></td>
<td width="30%"><?php echo $rows['name']; ?></td>
<td width="30%"><?php echo $rows['lastname']; ?></td>
<td width="30%"><?php echo $rows['email']; ?></td>

Does the user you are using in the DB connection have access to the database? Is the table created?

Also change your lines:

mysql_connect("$host", "$username", "$password")or die("cannot connect");
mysql_select_db("$db_name")or die("cannot select DB");

to:

mysql_connect($host, $username, $password)or die("cannot connect");
mysql_select_db($db_name)or die("cannot select DB");

Also move line 53 out side of your php tag to line 56.

Or change it to

echo "</table>";

stay away from projects until you have a good understanding of the code that you are doing, or using from other places.

try using the FQDN and image.

Example : http://www.example.com/images/email_header.jpg

Is Outlook set to receive HTML emails?

This is not the default setting, normally it is plain text

Do you have any rewrite rules setup?

If not, i am not surprised, the page willl need to be called with the file extension

Welcome to PHP.

Firstly get yourself an IDE, there are many threads on this forum dicussing the pros and cons of different ones. Have a play with them, and find one you are comfortable with.

Either go down the route of installing Apache & MySQL, or install XAMPP or WAMPP. Very straight forward to use. I am on a windows/linux dual boot system and opted for XAMPP (Apache Friends).

XAMPP under windows can be installed with Apache & MySQL as services, although the current model does have a glitch in it. So avoid this. All this means is you will manually have to start MySQL and Apache Server.

Find some easy tutorials to start with so you get a basic understanding. Avoid PHP & MySQL, as MySQL is depreciated. Either opt for MySQLi (good for both types of coding), or opt for PDO (OOP only).

Happy coding :):)

For this you would need to use a javascript call.

http://www.w3schools.com/js/js_popup.asp

Have you tried sending a single email? where $to is a set email address (your own for example).

Have you dumpped your $_GET variable to make sure it is being populated?

Where is the code for send.php or is that what gistfile1.txt is?

This part:

// get meessage to send
$message = $_GET['message'];

// loop through names / emails on index form
for ($x=0; $x<count($_GET); $x++)
{
if ($_GET["mail_$x"])
{
// mail setup
$to = $_GET["mail_$x"];
$subject = "News From Tap ";
$body = "Dear " . $_GET["name_$x"] . "
\n\n $message \n\n Josh \n\n Tap ";
mail($to, $subject, $body, $headers );
}
}

You seem to be using multiple $_GET, but you have one that has an additional space:

Line 16 from Index.php:

 echo "<input type = 'checkbox' name = 'mail_ ".$mailcount++." ' value 

This should be:

 echo "<input type = 'checkbox' name = 'mail_".$mailcount++." ' value 

Note the removal of the additional spacing between mail_ " as this will bugger your $_GET from your if ($_GET["mail_$x"]).

Also the same for this line in Index.php:

<input type = 'hidden' name='name_ ".$namecount++."' value = 

Additional spacing -> beware of those

To be honest there are a lot of books out there, although there are also a lot of very helpful tutorials.

It sounds like a cop out but this goolge search:

https://www.google.co.uk/search?client=ubuntu&channel=fs&q=php+oop+for+beginners&ie=utf-8&oe=utf-8&gl=uk&redir_esc=&ei=g9aYUejdOImAOP-dgYAO

Has a lot they you may find very helpful and easy to follow.

As you are starting out, i would shy away from MySQL completely unless you decide to use a PDO wrapper.

If you do get stuck then by almeans drop a thread. The DaniWeb community is second to none when it comes to help and assistance.

Good luck, and happy coding.

You need to change to either procedual and carry on using MySQL or change to PDO or MySQLi.

You cannot use OOP with MySQL, this has been covered on a few other threads previously.

Change the usage and you will be fine

A sample of PDO/MySQL connection with exception catch

try {
    $conn = new PDO('mysql:host=HOST;dbname=DATABASE_NAME', $username, $password);
    $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
} catch(PDOException $e) {
    echo 'ERROR: ' . $e->getMessage();
}

MySQL is not capable of OOP unless you use the PDO wrapper. So you will need to change either to using PDO with MySQL, or go to MySQLi OOP.

Is your DBConnector actually returning a live connection? WHat is the content of that Class?

Can you confirm are you using ZF or ZF2?

Also there must be more to the error.

How have you set the error handling?

Why are you using $arr, your variable is, as Diafol has pointed out -> $xml

@yy886,

This is part of an upload script i put together and using well:

$mime = array('image/gif', 'image/jpeg', 'image/jpg', 'image/png');
    if (in_array($_FILES['file']['type'], $mime) == FALSE) {
        echo "You are attempting to upload a \"{$_FILES['file']['type']}\" file type. <br/>
            This is not permitted.<br/>";
    } else {

$mime is an array that holds the accepted file types, the $_FILE[]['type'] is then checked to see if the uploaded mime type is allowed. If it is not, it is blocked.

Very similar to pixelsoul's example.

Have you got your mime types correct?

Have you checked your error log?

I would suggest adding a try{} and catch{}, as you may have an exception, or low value warning that is not showing up due to your settings

EDIT pipped by IIM :):)

Dear davidjennings

Your code is a miss mash of different coding technics.

You are using the MySQLi connection method but as MySQL.

For example:

MySQL

$con = mysql_connect('host','user','password'); <-- Notice no database selected

http://php.net/manual/en/function.mysql-connect.php

Where as your line 2 of code snippet 2 shows this:

$conn = mysql_connect("localhost","user_david","password","djenning_databaseclass"); **<-- You cannot select a database during MySQL connect**

MySQLi

$con = mysqli_connect('host','user','password','database');

http://www.php.net/manual/en/mysqli.construct.php

Sp you must decide which you are going to be using. As you have stated you want to use OOP.

If this is the case you can use MySQLi, or as I have already mentioned PDO with MySQL.

Thanks, I am trying to write functions and some OOP. How would I do this using OOP.

MySQL is not capable of OOP, either use MySQLi or MySQL with a PDO wrapper