thedigicraft / Atom.CMS

Atom.CMS
56 stars 52 forks source link

2014 dynamic web #215

Open bidjan opened 7 years ago

bidjan commented 7 years ago

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

dev123abc commented 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

creptor commented 7 years ago

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.

creptor commented 7 years ago

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.

dev123abc commented 7 years ago

Parse error: syntax error, unexpected '$q' (T_VARIABLE) in C:\wamp\www\Series\index.php on line 5

dev123abc commented 7 years ago

sorry this is the error

creptor commented 7 years ago

That has no error, please post the hole code, use http://pastebin.com/ or https://gist.github.com/

dev123abc commented 7 years ago

<?php

include('config/setup.php')

$q = "SELECT * pages WHERE id=1"; $r = mysqli_query($dbc, $q);

$page = mysqli_fetch_assoc($r);

?>

<!DOCTYPE html>

<?php echo $page_title.' | '. $site_title ?> ```

This is my footer.

```
dev123abc commented 7 years ago

<?php // setup File:

Database connection here....

$dbc = mysqli_connect('localhost','dev','thepassword1','projectcms') OR die('Could not connect because:'.mysqli_connect_error());

$site_title = 'ProjectCMS'; $page_title = 'Home Page';

?>

creptor commented 7 years ago

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.

dev123abc commented 7 years ago

Warning: mysqli_fetch_assoc() expects parameter 1 to be mysqli_result, boolean given in C:\wamp\www\Series\index.php on line 8

dev123abc commented 7 years ago

now this error

creptor commented 7 years ago

The variable $q = "SELECT * pages WHERE id=1"; should be $q = "SELECT * FROM pages WHERE id=1";

dev123abc commented 7 years ago

yeah thanks alot all issues gone now appreciate your work

dev123abc commented 7 years ago

thanks for your time so nice of u

creptor commented 7 years ago

No problem!! 😝