
Philip
Staff Alumni-
Posts
4,665 -
Joined
-
Last visited
-
Days Won
20
Everything posted by Philip
-
Not UK, but US - but should have all the cars that you can buy in the US given the link is data safety records http://www-nrd.nhtsa.dot.gov/database/aspx/vehdb/veh_catalog_by_mmy.aspx Can't seem to find the UK equiv
-
Calm down there buddy You saying "can you show me how to..." and then listing the original task as if you copy/pasted it from a assignment looks mighty suspicious if you ask me. And yes I needed help when I first started, but I learned to read the manual and google'd examples then tried it myself. Also, I find it highly ironic that you said:
-
Means it will be on line 7 Remember the sticky for header errors: http://www.phpfreaks.com/forums/index.php/topic,37442.0.html
-
[SOLVED] Problem with upload form. Please help!
Philip replied to patheticsam's topic in PHP Coding Help
Is it throwing any errors, and do you have stuff like error_reporting(E_ALL); at the top of your script? -
Smells like homework to me
-
Are you using a custom DB class, or trying to use mysqli? If it's custom, please post the full class EDIT: I read in your other post - see here for manual doc: http://phplens.com/lens/adodb/docs-adodb.htm#execute and... http://phplens.com/lens/adodb/docs-adodb.htm#ex4
-
[SOLVED] Would like my first oop object to be checked
Philip replied to Potatis's topic in PHP Coding Help
Well, table is a reserved word so it needs to be in ticks. INSERT INTO `table` (`user`) VALUES ('My Name') -
[SOLVED] Would like my first oop object to be checked
Philip replied to Potatis's topic in PHP Coding Help
$result = mysqli_query($this->connection,$sql); if(!$result){ die("It's not working...YET AGAIN!: " . mysqli_connect_error()); } Are you sure you want to check for a connect error there? How about just mysqli_error -
<?php error_reporting(E_ALL); class subClass { public $test; function __construct($test) { $this->test = $test; } public function subMethod( ) { echo $this->test; } } class mainClass { public $subClass; public $foo; function __construct( ) { $this->subClass = new subClass('hello'); } } $myClass = new mainClass; $myClass->subClass->subMethod(); ?> Its basically making the variable subClass a new class, which allows access to its methods. Whats the purpose for this?
-
it's all here buddy: http://www.php.net
-
$10k sounds a bit high to me, although I've been wrong before. As chris said, sedo.com THE place to go to for domain auctions/bids.
-
[SOLVED] How do I compare a variable to a function array?
Philip replied to pneudralics's topic in PHP Coding Help
function badword() { array("badword1","badword2","badword3") } Should be the following for it to work: function badword() { return array("badword1","badword2","badword3"); } As a whole: <?php function badword() { return array("badword1","badword2","badword3"); } $badwords = badword(); if (!in_array($_POST['name'],$badwords)) { // // not a bad word // } else { // // bad word // } -
That tells the other server what the browser it is - which is easily faked as seen above, mostly used for just statistics or for showing different content for different browsers
-
http://www.phpfreaks.com/forums/index.php/board,8.0.html Also places like https://www.scriptlance.com/ and such
-
Well, you could always use an api or curl but searching my email and paypal, came up with 382 results - none of which really have anything to do with me. according to your theory i'd be a thief
-
I do. Bunch of hard-line, right-wing, state-arrogant folks. Everyone from Texas thinks that they are better than anyone else from any other state. Most of them are also very close-minded in terms of progressive thinking on social matters. My experience is based on the fact that my company has a office in Texas and I've been dealing with them for close to 3 years now. I've actually been to Texas about 20 times and the mindset seems to be spread across towns, so it's not limited to the small amount of people I deal with. Granted, most of them are nice people... they just have their own way of doing things. but we are better! haha, joking aside, most of us are verryyyy close minded which kinda annoys me at times. Nonetheless I do love my state
-
Bastard, got something to say about Texas?
-
What are you trying to accomplish with this? This code doesn't make much sense to me. You're trying to concat a string onto an array. I'm guessing you want to do like $cookie0[] = '^'.$cookie0[$i] instead?
-
Just my version of TLG's code: <?php // Array of words we will check for $wordList = array('cats','dogs','frog','mice','fart','mart','kart'); // An array of the letters $letters = range('a', 'z'); // Set the counter at one $c = 1; // Figure out the start time $starttime = microtime(); $startarray = explode(" ", $starttime); $starttime = $startarray[1] + $startarray[0]; // Start the main loop while(!in_array($st, $wordList)) { // Shuffle the letter list shuffle($letters); // Grab the first four letters: // (Note you could also use $st = implode(array_slice($letters, 0, 4)); // But I think that would use waster more system resources by running more // functions than really needed....) $st = $letters[0].$letters[1].$letters[2].$letters[3]; // Just to show what word we are on echo $c,' ',$st,'<br>'; // Increment the counter $c++; } // Figure out the finish time $endtime = microtime(); $endarray = explode(" ", $endtime); $endtime = $endarray[1] + $endarray[0]; echo 'Page loaded in ', round($endtime-$starttime, 4), ' seconds with a total of ',$c,' tries'; ?> Simplifies the while loop and shows the load time. Just FYI - it is possible for bigger words that your script could time out trying to find the correct word.
-
You could put it in a for loop... but you could be waiting a while. After all that's only 456,976 possible combinations of 4 letter words
-
Yeah, and I'm blind too haha. Running it in something like PhpMyAdmin returns nothing as well?
-
add or die(mysql_error()); $ret = mysql_query($q) or die(mysql_error());
-
Opps, it should have thrown an error for it anyways. (note the different tick marks) SELECT `sup` FROM `sprint` WHERE `sup` IS NOT NULL GROUP BY `sup`
-
I think it's because if ($this->link->connect_error) will always be true try: if (!empty($this->link->connect_error))
-
select `sup` from `sprint` WHERE `sup` IS NOT NULL GROUP BY 'sup'