Open bidjan opened 7 years ago
$q="SELECT * FROM atomcms.pages WHERE id=1"; on video series Developing a Dynamic Website 2014 - Part 9 - Using PHP to Display Data from MySQL
I haven't found any other series that are has complete or extensive has this one, you by now should try to create your own page and do some research in internet or books. Any way, if you find something that would be helpful for learning PHP, please post it here so that the other can learn from it too.
Note: By now you know most of the basic of PHP, which is offered in many web learning applications, if you wish to get into one of those, make sure that it has new content so you don't get bored.
Another thing to learn after you finish could be to create mobile apps, that should be interesting and very helpful if you're making things that are based on interaction with the users.
Parse error: syntax error, unexpected '$q' (T_VARIABLE) in C:\wamp\www\Series\index.php on line 5
sorry this is the error
That has no error, please post the hole code, use http://pastebin.com/ or https://gist.github.com/
<?php
include('config/setup.php')
$q = "SELECT * pages WHERE id=1"; $r = mysqli_query($dbc, $q);
$page = mysqli_fetch_assoc($r);
?>
<!DOCTYPE html>
<?php // setup File:
$dbc = mysqli_connect('localhost','dev','thepassword1','projectcms') OR die('Could not connect because:'.mysqli_connect_error());
$site_title = 'ProjectCMS'; $page_title = 'Home Page';
?>
The include('config/setup.php')
is missing a semicolon, it should be like this:
include('config/setup.php');
Note: Please if an error is out of subject, create a new issue for it, to avoid issues getting messy.
Warning: mysqli_fetch_assoc() expects parameter 1 to be mysqli_result, boolean given in C:\wamp\www\Series\index.php on line 8
now this error
The variable $q = "SELECT * pages WHERE id=1";
should be $q = "SELECT * FROM pages WHERE id=1";
yeah thanks alot all issues gone now appreciate your work
thanks for your time so nice of u
No problem!! 😝
Hi creptor:
I have learned a lot about taking short cuts in writing scripts and overall php folder structure.
Curious to be informed if any additional video tutorials either as an extension to current series or new series are under consideration.
Thank you again for all your help.
Bob Ghodsi