Jonathon
Members-
Posts
1064 -
Joined
-
Last visited
-
Days Won
55
Everything posted by Jonathon
-
Try this at the very top of a new page <?php $link = mysql_connect('localhost', 'your_username', 'your_password'); if (!$link) { die('Could not connect: ' . mysql_error()); } echo 'Connected successfully'; mysql_close($link); ?> see if it connects now. I don't think you have mysqli enabled, you hsould be able to do this: look in your xampp/php/ folder for a file called php.ini then look for mysql or mysqli and see if you can find that line and then remove the ';' to enable the mysqli functions it should be this line i think extension=php_mysqli.dll make sure the ; that is probably there before the start of this line is removed. Then restart apache and run phpinfo() try and find mysqli again
-
Programming Questions
Jonathon replied to Fergal's topic in PHP for the Web: Visual QuickStart Guide (4th Edition)
Well at least that's something. -
I don't know but I would imagine that you couldn't connect with one language (Perl) and then use another language (PHP) to manipulate that database connection. (However, i don't actually know this for sure)
-
Print Returns An Integer Value
Jonathon replied to Fergal's topic in PHP for the Web: Visual QuickStart Guide (4th Edition)
Yep -
Programming Questions
Jonathon replied to Fergal's topic in PHP for the Web: Visual QuickStart Guide (4th Edition)
Do you at least sign them? -
Programming Questions
Jonathon replied to Fergal's topic in PHP for the Web: Visual QuickStart Guide (4th Edition)
Got to enter the competitions HartleySan -
Programming Questions
Jonathon replied to Fergal's topic in PHP for the Web: Visual QuickStart Guide (4th Edition)
Thanks Fergal , to respond to your statement, no, I do not have the book. I won a copy of it though when it was released, but I thought the competition was for Larry's 4th edition of PHP and MySQL, so Larry kindly let me exchange my copy of the book for the new PHP and MySQL book when it comes out - Thanks Larry! -
Programming Questions
Jonathon replied to Fergal's topic in PHP for the Web: Visual QuickStart Guide (4th Edition)
I shall try to help you, but you must appreciate I don't have the book and therefore can't see the context it's written in. 1. Statement - typically a statement is used in conjunction with an "if" hence an "if statement" example if( 1 == 1) The (1 == 1) is a statement that you are checking is correct or not. 2. Executable - executable means to be able to execute or run something. Often you will hear someone say a file is executable. However what context this was used in i'm not sure. 3 & 4. Refers to how a language is run, PHP is an interpreted language and is ran by an interpreter program compiled languages, I would struggle to explain compliers. 5. Attributes depends what context this is written in, do you have an example? 6. Function - a function is a series of code that does a certain job. Often you'll find that a function is often reused. function myFunction () { echo 'This is out put from the function'; } Then you can call this function from your executed script like so: (as you should really separate logic(functions etc) from your code <?php require ('../folderforfunctions/functions.php'); myFunction(); // would echo out "This is output from the function" 7. Argument - Arguments are passed to functions. For instance function myFunction ($name) { echo "My name is $name"; } require ('../folderforfunctions/functions.php'); $name = 'Jonathon'; myFunction($name); // would echo "My name is Jonathon" PHP has it's own built functions too 9. Language constructs are often mistakenly referred to as functions that are built into php. Things like stripos() is a PHP function, things like array() and echo() are language constructs. I wouldn't really worry about the technicality around them. But they operate slightly differently, and you would use them in different ways, take for example these language constructs require, require_once, empty,echo,array,unset,include,isset. You might not know what they all do yet, but you'll see that they differ from functions as you go through the book i'm sure. Hope that helps, I wouldnt worry about your list of items you don't understand, you'll get to grips with that as you have more experience with the language. -
Shop.Php Problem - Chapter 8
Jonathon replied to Ryan R's topic in Effortless E-Commerce with PHP and MySQL
HostGator is my vote, I hear good thinks about ipage too.