You are here: Re: Variable doesn't get populated « PHP SQL « IT news, forums, messages
Re: Variable doesn't get populated

Posted by Tim Roberts on 10/21/05 08:52

Raj <raj@nospam.com> wrote:
>
>It appears that the script doesn't get as far as the SQL. I don't know why. I
>dontl get informed of any errors.
>
>$num does not get populated. I think it should be 0 if the query above it
>returns no values. Can someone tell me why it doesn't get populated at least
>with a zero..
>
>Please help.
>
>Here is the code:
>
>start.php
>
><?php
>session_start();
>session_destroy();
>include("./general_scripts_etc/header1.php");
>$s=$_GET['s'];
>print("9");
>print($s);
>print("9");
>$query="SELECT * FROM site_data WHERE site_name=$s";

I'm sure you meant this:

$query="SELECT * FROM site_data WHERE site_name='$s'";
--
- Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.

 

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

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