You are here: Re: i dont understand why this wont run « PHP Programming Language « IT news, forums, messages
Re: i dont understand why this wont run

Posted by so many sites so little time on 11/19/06 14:51

gah sorry let me copy and paste it i didnt put it in the directory and
its such a stupid directory name that i keep forgetting exactly what it
is... http://kirewire.com/pp2/index.php
Jerry Stuckle wrote:
> so many sites so little time wrote:
> > alright so this is where im at, i did this and now it says it works but
> > jerry knows that i resolved my problem earlier with
> > www.kirewire.com/tpp2/update_site.php now i just fixed the problem with
> > kirewire.com/tpp2/index.php but nothing shows up on the index site but
> > i get no errors on the index site it looks like this
> >
> > if ($dbc = mysql_connect ('localhost', 'kirewire', 'erikwire')) {
> >
> > if (!mysql_select_db ('kirewire_tpp')) {
> > die ('<p>Could select the database because: <b>' . mysql_error() .
> > '</b></p>');
> > }
> >
> > } else {
> > die ('<p>Could not connect to MySQL because: <b>' . mysql_error() .
> > '</b></p>');
> >
> > }
> > $result = mysql_query ($query);
> >
> > $query = 'SELECT * FROM home';
> >
> > print "<p><h3>{$result}</h3>
> > </p><hr />\n";
> >
> >
> > mysql_close(); // Close the database connection.
> > ?>
> >
> > on the update site it looks like this:
> >
> > // Define the query.
> > $query = "Update home Set body = '($_POST)'";
> >
> > // Execute the query.
> > if (@mysql_query ($query)) {
> > print '<p>Your site has been updated!.</p>';
> > } else {
> > print "<p>Sorry by your site could not be updated because: <b>" .
> > mysql_error() . "</b>. The query was $query.</p>";
> > }
> >
> > mysql_close();
> >
> > }
> >
> > // Display the form.
> > ?>
> >
> > so many sites so little time wrote:
> >
> >>i tried to fix it getting
> >>Parse error: syntax error, unexpected T_STRING in
> >>/home/kirewire/public_html/pp2/index.php on line 222
> >>
> >>for
> >>
> >>...ini_set ('display_errors', 1);
> >>error_reporting (E_ALL & ~E_NOTICE);
> >>
> >>// Connect and select.
> >>if ($dbc = mysql_connect ('localhost', 'kirewire', 'erikwire')) {
> >>
> >> if (!mysql_select_db ('kirewire_tpp')) {
> >> die ('<p>Could select the database because: <b>' . mysql_error() .
> >>'</b></p>');
> >> }
> >>
> >>} else {
> >> die ('<p>Could not connect to MySQL because: <b>' . mysql_error() .
> >>'</b></p>');
> >>
> >>
> >>$query = SELECT body from home;
> >>
> >> print "<p><h3>{$$query}</h3>
> >> </p><hr />\n";
> >> }
> >>
> >>mysql_close(); // Close the database connection.
> >>?>
> >>so many sites so little time wrote:
> >>
> >>>im really stuck what would work in this case all im trying to do with
> >>>that $show is to query the data base to select from table home the info
> >>>in column body and print it to the screen
> >>>so many sites so little time wrote:
> >>>
> >>>>woops sorry its /tpp why isnt it valid syntax :( pay so much for books
> >>>>that lie ;_;
> >>>>Jerry Stuckle wrote:
> >>>>
> >>>>>so many sites so little time wrote:
> >>>>>
> >>>>>>to see a test of this go to www.kirewire.com/ttp/index.php
> >>>>>>
> >>>>>>so many sites so little time wrote:
> >>>>>>
> >>>>>>
> >>>>>>>the table is head the colunm is called body
> >>>>>>>
> >>>>>>><?php //show_site.php
> >>>>>>>// This script retrieves blog entries from the database.
> >>>>>>>
> >>>>>>>// Address error handing.
> >>>>>>>ini_set ('display_errors', 1);
> >>>>>>>error_reporting (E_ALL & ~E_NOTICE);
> >>>>>>>
> >>>>>>>// Connect and select.
> >>>>>>>if ($dbc = @mysql_connect ('localhost', 'username', 'password')) {
> >>>>>>>
> >>>>>>> if (!@mysql_select_db ('username_tpp')) {
> >>>>>>> die ('<p>Could select the database because: <b>' . mysql_error() .
> >>>>>>>'</b></p>');
> >>>>>>> }
> >>>>>>>
> >>>>>>>} else {
> >>>>>>> die ('<p>Could not connect to MySQL because: <b>' . mysql_error() .
> >>>>>>>'</b></p>');
> >>>>>>>}
> >>>>>>>{
> >>>>>>>if ($show = SELECT body from home;)
> >>>>>>>
> >>>>>>> print "<p><h3>{$show}</h3>
> >>>>>>> </p><hr />\n";
> >>>>>>> }
> >>>>>>>
> >>>>>>>mysql_close(); // Close the database connection.
> >>>>>>>?>
> >>>>>>
> >>>>>>
> >>>>>Not Found
> >>>>>The requested URL /ttp/index.php was not found on this server.
> >>>>>
> >>>>>Additionally, a 404 Not Found error was encountered while trying to use
> >>>>>an ErrorDocument to handle the request.
> >>>>>Apache/1.3.37 Server at www.kirewire.com Port 80
> >>>>>
> >>>>>--
> >>>>>==================
> >>>>>Remove the "x" from my email address
> >>>>>Jerry Stuckle
> >>>>>JDS Computer Training Corp.
> >>>>>jstucklex@attglobal.net
> >>>>>==================
> >
> >
>
> Not Found
> The requested URL /tpp2/index.php was not found on this server.
>
> Additionally, a 404 Not Found error was encountered while trying to use
> an ErrorDocument to handle the request.
> Apache/1.3.37 Server at www.kirewire.com Port 80
>
> And you'll get more help when you learn to post properly.
>
>
> --
> ==================
> Remove the "x" from my email address
> Jerry Stuckle
> JDS Computer Training Corp.
> jstucklex@attglobal.net
> ==================

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация