PHP Tutorials: Creating a Blog (Part 7/11)

preview_player
Показать описание

Official site

Twitter
Рекомендации по теме
Комментарии
Автор

So far I must agree with Angela; either there's some little annoying syntactical goof-up that you forgot to mention or this part simply doesn't work.  Maybe in lesson 8?

But all that aside, thanks for the great tutorial; you're taking my PHP skills to the next level. :)

MyOnlineTeacher
Автор

Put the following right at the very top of your document:
ob_start();
and this at the bottom:
ob_flush();
-- worked for me

JamieeDeVivo
Автор

empty returns also true if the string is "0"

mgria
Автор

Can you use inline styles within the text area like in wordpress?

ACABSTUDIOS
Автор

Thanks for response, but I already have it as "posts". Any other ideas?

MrPatco
Автор

How to edit code to put image into posts?

GoranMarkovic
Автор

the message error can not be display on the web but say some thing like
[] operator not supported for strings in on line 13

thierrdel
Автор

I have everything as u did.. errors works fine but when I fill in all fields and submit nothing is stored in the database and no errors :S any ideas? also when I added the last thing "index(dot)php?id={$id}"
I get it as "index(dot)html?id={$id}" in the browser :

MrPatco
Автор

Yes yes mine is the exact same but not working :/ i fixed the other problem i had now it shows "ocalhost/index . php?id=0" but does not add a post in the database

MrPatco
Автор

People that are having issues with errors not displaying should make sure there is no whitespace between the opening and closing tags for the textarea element. i.e. <textarea>(no space here)<?php code?>(no space here)</textarea>. If you have moved the closing tag to a new line as many text editors do automatically then this space is added to the text area, but you're unable to see it, and it causes the textarea element to be 'non-empty'.

rogertunnell
Автор

with the error syntax do not work and show this message

thierrdel
Автор

the $errors messages do not desplayed!!

GiovannyCapone
Автор

Warning: Cannot modify header information - headers already sent by (output started at in on line 32
please help

alihaider-pvtw
Автор

I have no idea since I haven't been able to fix it for myself yet.

MrPatco
Автор

It's just two square brackets, he's using a strange font that makes it appear as if it's a square.

Mrcomtech
Автор

i follow all the step in creating a blog but still i cant find a solution why it cant add records creating a post..this is my code..
add_post.php
if( empty($errors))
{
add_post($title, $contents, $_POST['category']);
}

kennethwhinstonbarsalote
Автор

here is the code: github . com/andiio/blog

andikoru
Автор

followed this video line by line and even rewind; errors DO NOT DISPLAY. gonna have to give this a thumbs down.  please post a correction video

Ang.