Jump to content

JREAM

Members
  • Posts

    127
  • Joined

  • Last visited

Contact Methods

  • Website URL
    http://jream.com

Profile Information

  • Gender
    Male
  • Location
    Florida

JREAM's Achievements

Regular Member

Regular Member (3/5)

0

Reputation

  1. I would check out PhalconPHP, the speed cannot be beat and it has everything you need.
  2. // way 1... (But im not sure how I can hold the errors inside the Blah class) everytime an item is called class Blah { public function __construct() { $this->slice = new Slice(); $this->thumb = new Thumb(); } } $blah = new Blah(); $blah->slice->file('test.jpg'); // Way 2 class Blah { public function __construct() { $this->_slice = new Slice(); $this->_thumb = new Thumb(); } public function slice($arg) { $this->_slice->{$arg[0]}($arg[1]) } public function thumb($arg) { $this->_thumb->{$arg[0]}($arg[1]) } } $blah = new Blah(); $blah->slice('file', 'test.jpg');
  3. I can't remember but you can install GD this way: sudo apt-get install php5-gd /etc/init.d/apache2 restart But i installed PHP with: sudo apt-get install php5 libapache2-mod-php5 and GD and a ton of mods were included. The php INI file is I believe here: /etc/php5/apache2/php.ini
  4. How do you get this going: function Testing($value) { echo $this->Settings->page_$typeOfNotify; die; } function Testing('hello'); should check $this->Settings->page_hello;
  5. I think you above would work, but I think the correct way is to do it like this: SELECT * FROM table WHERE filled=0 AND type IN ('audio', 'electronic', 'large print')
  6. For starters there is no code commenting and takes 4x as along to read through
  7. I recently re-installed WAMP, and im not sure why this is happening.. DEFINE('root', dirname(__FILE__). '/'); echo root; Outputs: C:\Workspace\project_1/files/ Previously it would list like: http://workspace/project_1/files/ According to my localhost it's in. Does anyone know why this is?
  8. You can tell this causes an error: $set = array(1, 2, 3, 4); $set = array(5, 6, 7, ; So I could do $set = array(1, 2, 3, 4); $set2 = array(5, 6, 7, ; $all = array_merge($set, $set2); And also $set = array(1, 2, 3, 4); $set[] = 5; $set[] = 6; // etc. But is there a way to do like.. $set = array(1, 2, 3, 4); $set .= array(5, 6, 7, ; // Notice the period
  9. Hmm maybe AJAX is the best option to do such a thing. I thought for a moment to use a 1x1 iframe to go to the url but Im still not sure if that would work out right lol. I plan to encrypt only one file so people cant rewrite the thing to mess with it.
  10. This is very messy! 1. I would look up Naming Conventions, you have very hard to read variables, no need to use Login_User, when you are using the _ for a spacer, you could just use login_user; alternatively without the _ spacer you could do loginUser (camelCase). 2. Too many nested if/else statements! 3. Possibly break things into a few more functions 4. Make comments in your code, when you come back to this in a few months I think you will be very confused! 5. Your naming is confusing, perhaps rename your database logic to differentiate between the two (SysCheck rather than LoginCheck, and space out your query to be readable) $SysCheck = $DB->query(" SELECT id,username,account_status,suspended_timestamp FROM members WHERE username='$Login_Username' && password='$Login_Password'"); /** Login Status counts if a user exists with user/password combo */ $Login_Status = $SysCheck->num_rows; $Login_Information = $SysCheck->fetch_object(); 6. $DB->real_escape_string is unnecessarily long to type out, why not just name the method $DB->clean or something, I can't imagine typing those underscores so much is that enjoyable! 7. An example function function ValidUser($str) { /** Returns a Boolean */ return preg_match("/^[a-z0-9]{2,20}$/i", $str) || preg_match("/^[a-z0-9]{2,20}$/i", $str); } case "Login": if(!ValidUser($_POST["F_1_Login_Username"]) { $Login_Error = "INCORRECT ACCOUNT INFORMATION"; }
  11. I have software that people install. When they install it, is there a way to make it post their domain name to my website? I know I could do a header('location: http//www.mysite.com/id=?domain.com'); then handle it anyway from mysite.com I wanted. But I don't want to force the user to to actually go to my page. I dont know much about cURL or what it does, hopefully I dont have to use it because I dont want to require additional plugins for the current software. Is there a way to post to another domains url without actually refreshing the page?
  12. If you are refreshing the page after the mail sends you wont see the error either
  13. What is the error you are getting? It won't send an email to "email", has to be a real address. Im guessing you just edited that. Here is a good header: $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $headers .= "From: $from" . "\r\n" . "Reply-To: $from" . "\r\n" . 'X-Mailer: PHP/' . phpversion();
  14. I have this: $arrForms['title'] I want like to get: title Basically so I can check a field, and also the output will tell me the name of the array piece.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.