1,080,521 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?

Posts by Squidge Contributing to Articles being Marked Solved

Squidge
Posting Pro in Training
433 posts since Dec 2009
Reputation Points: 111
Solved Threads: 66
Skill Endorsements: 5

Is Outlook set to receive HTML emails?

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

Squidge
Posting Pro in Training
433 posts since Dec 2009
Reputation Points: 111
Solved Threads: 66
Skill Endorsements: 5

Do you have any rewrite rules setup?

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

Squidge
Posting Pro in Training
433 posts since Dec 2009
Reputation Points: 111
Solved Threads: 66
Skill Endorsements: 5
Squidge
Posting Pro in Training
433 posts since Dec 2009
Reputation Points: 111
Solved Threads: 66
Skill Endorsements: 5

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?

Squidge
Posting Pro in Training
433 posts since Dec 2009
Reputation Points: 111
Solved Threads: 66
Skill Endorsements: 5

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

Squidge
Posting Pro in Training
433 posts since Dec 2009
Reputation Points: 111
Solved Threads: 66
Skill Endorsements: 5

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.

Squidge
Posting Pro in Training
433 posts since Dec 2009
Reputation Points: 111
Solved Threads: 66
Skill Endorsements: 5

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

Squidge
Posting Pro in Training
433 posts since Dec 2009
Reputation Points: 111
Solved Threads: 66
Skill Endorsements: 5

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();
}
Squidge
Posting Pro in Training
433 posts since Dec 2009
Reputation Points: 111
Solved Threads: 66
Skill Endorsements: 5

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?

Squidge
Posting Pro in Training
433 posts since Dec 2009
Reputation Points: 111
Solved Threads: 66
Skill Endorsements: 5

Can you confirm are you using ZF or ZF2?

Also there must be more to the error.

How have you set the error handling?

Squidge
Posting Pro in Training
433 posts since Dec 2009
Reputation Points: 111
Solved Threads: 66
Skill Endorsements: 5

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

Squidge
Posting Pro in Training
433 posts since Dec 2009
Reputation Points: 111
Solved Threads: 66
Skill Endorsements: 5

@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 :):)

Squidge
Posting Pro in Training
433 posts since Dec 2009
Reputation Points: 111
Solved Threads: 66
Skill Endorsements: 5

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.

Squidge
Posting Pro in Training
433 posts since Dec 2009
Reputation Points: 111
Solved Threads: 66
Skill Endorsements: 5

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

Squidge
Posting Pro in Training
433 posts since Dec 2009
Reputation Points: 111
Solved Threads: 66
Skill Endorsements: 5
Squidge
Posting Pro in Training
433 posts since Dec 2009
Reputation Points: 111
Solved Threads: 66
Skill Endorsements: 5
Squidge
Posting Pro in Training
433 posts since Dec 2009
Reputation Points: 111
Solved Threads: 66
Skill Endorsements: 5

As it is encrypted not sure what you expect anyone to do.

Have you contacted FileShareScript?

Have you got the IONCUBE installed?

Squidge
Posting Pro in Training
433 posts since Dec 2009
Reputation Points: 111
Solved Threads: 66
Skill Endorsements: 5

Whats in your config.php

As Diafol has mentioned the error is in there

Squidge
Posting Pro in Training
433 posts since Dec 2009
Reputation Points: 111
Solved Threads: 66
Skill Endorsements: 5

I gotta be the dumbest poster on this site... wrong title + wrong forum.

Please mark this solved

Squidge
Posting Pro in Training
433 posts since Dec 2009
Reputation Points: 111
Solved Threads: 66
Skill Endorsements: 5
 
© 2013 DaniWeb® LLC
Page generated in 0.1267 seconds using 2.72MB