p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/)
-   BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 (http://p2p.wrox.com/book-beginning-php-apache-mysql-web-development-isbn-978-0-7645-5744-6-123/)
-   -   chapter 6 - where is the file people.php? (http://p2p.wrox.com/book-beginning-php-apache-mysql-web-development-isbn-978-0-7645-5744-6/35274-chapter-6-where-file-people-php.html)

Arjan November 20th, 2005 08:09 PM

chapter 6 - where is the file people.php?
 
I can't ADD people on the BD. I can ADD movies but I can't ADD people.
The link ADD (people) go to people.php
Where is this file?
Tx :)



Ruff D July 29th, 2006 12:17 PM

Just experiencing the same problem the book refers to code that is not in the book.

I'm surprised you have not had a response after all this time

Help :)


tgsqrd September 3rd, 2006 12:32 PM

Arjan,

I did not spend a lot of time reviewing your Chptr 6 problem but, I don't think that there is a people.php.

If you go back to Chapter 3, pages 94-95, you'll find a file, "createmovie.php" which creates the database(DB), "moviesite" which has the table named "people" in it. Then, when you use the "movie.php" page, it will refer to that table in that DB.

TG^2


tgsqrd September 3rd, 2006 12:41 PM

Do not forget to fill your newly created DB with the data found in the "moviedata.php" script which follows the "createmovie.php" script.

TG^2


dba October 20th, 2007 03:09 PM

WROX and the authors evidently decided they could write a book but not provide example files like "people.php" which IS require in the code for chapter 6. That, and as seen on this site, a ungodly amount of errors and missing code makes this book a rip off. You can learn a few things from it but without the code it reduces the value significantly.

One way to show your anger is to stop purchasing books by the authors and perhaps WROX.



newbreed65 September 27th, 2008 01:02 PM

i dont know if u notice but its the excersize u have to try yourself it abit annoying that they dont give you it but well it a good way to learn and gain better understanding


italia47 April 7th, 2017 02:14 PM

Create a file with a form with table entries (people_fullname, people_isactor, people_isdirector) insert_people.php create a file with INSERT INTO queries.
Obviously includes with connection file, and any header ( 'location: filedel form');
I have done so:
file: people.php
PHP Code:

<?php
include('conn.php');
?>
<!DOCTYPE html>
<html>
<head>
    <title>DATABASE dei FILM</title>
    <style type="text/css">
    th{background-color: #999;}    
    .odd_row {background-color: #EEE;}
    .even_row{background-color: #FFF;}
    </style>
</head>
<body>
<h1 align="center" style="margin-top: 50px;"><em>Inserimento Attori - Registi</em></h1>
<form style="margin-top:150px;  margin-top:150; width: 70%;margin-left:auto; margin-right:auto; border: dotted #efefef 1px;" action="insert_people.php" method="post">
<fieldset>
<legend> Form inserimento</legend>
<br>
<label>Nome e cognome attore o regista</label><br>
<input type="text" name="people_fullname"><br>

<label>Specificare se Attore principale</label>    <br>
<input type="text" name="people_isactor" placeholder="Codice 1 se attore - codice 0 se regista"><br>

<label>Specificare se Regista</label>    <br>
<input type="text" name="people_isdirector" placeholder="Codice 0 se attore - codice 1 se regista"><br>

<input type="submit" name="submit" value="INSERISCI">

</fieldset>
</form>
</body>
</html>

File insert_people.php
PHP Code:


<?php
include('conn.php');

$people_fullname  $_POST['people_fullname'];
$people_isactor  $_POST['people_isactor'];
$people_isdirector$_POST['people_isdirector'];



$query "INSERT INTO people (people_fullname, people_isactor,people_isdirector) 
VALUES 
('$people_fullname', '$people_isactor' ,'$people_isdirector')"
;

$result mysql_query($query);

if(
$result) {
    
header('location:people.php');
}
?>

I hope I was of aiuto..anche though as I used Italian terms of my tongue.
let me know ... and good luck!


All times are GMT -4. The time now is 07:09 AM.

Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
2013 John Wiley & Sons, Inc.