Hi
I have one page: index.php - news portal - with headlines, every headline is
a link to whole news , and the code is like this:
....
$news_id=$row["news_id"];
echo "<a href='news.php? news_id=$news_i d'>
....
the other page -news.php- that shows that news looks like this:
....
<?php
$result = mysql_query("se lect * from news WHERE
news_id='$news_ id'") or
die (mysql_error()) ;
while ($row = mysql_fetch_arr ay($result))
.....
and this works fine on the Internet (PHP/MySQL/Apache)
but locally, I tried the same thing, and it doesn't work - but on
PHP/MySQL/IIS
it seems like it doesn't bring $news_id to sql query... is this a IIS
problem or what?
thanks for any help
Vyeran 5 2185
Vjeran wrote:
Hi
I have one page: index.php - news portal - with headlines, every headline is
a link to whole news , and the code is like this:
...
$news_id=$row["news_id"];
echo "<a href='news.php? news_id=$news_i d'>
...
the other page -news.php- that shows that news looks like this:
...
<?php
$result = mysql_query("se lect * from news WHERE
news_id='$news_ id'") or
die (mysql_error()) ;
while ($row = mysql_fetch_arr ay($result))
....
and this works fine on the Internet (PHP/MySQL/Apache)
but locally, I tried the same thing, and it doesn't work - but on
PHP/MySQL/IIS
it seems like it doesn't bring $news_id to sql query... is this a IIS
problem or what?
thanks for any help
Vyeran
What is the error?
"Vjeran" <vp******@MAKNI foi.hrwrote in message
news:eg******** **@ss408.t-com.hr...
Hi
I have one page: index.php - news portal - with headlines, every headline
is
a link to whole news , and the code is like this:
...
$news_id=$row["news_id"];
echo "<a href='news.php? news_id=$news_i d'>
...
the other page -news.php- that shows that news looks like this:
...
<?php
$result = mysql_query("se lect * from news WHERE
news_id='$news_ id'") or
die (mysql_error()) ;
while ($row = mysql_fetch_arr ay($result))
....
and this works fine on the Internet (PHP/MySQL/Apache)
but locally, I tried the same thing, and it doesn't work - but on
PHP/MySQL/IIS
it seems like it doesn't bring $news_id to sql query... is this a IIS
problem or what?
thanks for any help
Vyeran
perhaps: relying on register globals to get $news_id in place of
$news_id = $_GET['news_id']
["Followup-To:" header set to comp.lang.php.]
Vjeran wrote:
<?php
$result = mysql_query("se lect * from news WHERE
news_id='$news_ id'") or
die (mysql_error()) ;
while ($row = mysql_fetch_arr ay($result))
....
It appears you have register_global s on. http://php.net/register_globals
*Turn it off!*
And change your code to:
<?php
$result = mysql_query("se lect * from news WHERE news_id='".$_GE T['news_id']."'") or die (mysql_error()) ;
...
Happy Coding :)
--
File not found: (R)esume, (R)etry, (R)erun, (R)eturn, (R)eboot
thank you Pedro and Johnny, it's working now...
"Pedro Graca" <he****@dodgeit .comwrote in message
news:sl******** ***********@ID-203069.user.ind ividual.net...
["Followup-To:" header set to comp.lang.php.]
Vjeran wrote:
><?php $result = mysql_query("se lect * from news WHERE news_id='$news _id'") or die (mysql_error()) ; while ($row = mysql_fetch_arr ay($result)) ....
It appears you have register_global s on. http://php.net/register_globals
*Turn it off!*
And change your code to:
<?php
$result = mysql_query("se lect * from news WHERE
news_id='".$_GE T['news_id']."'") or die (mysql_error()) ;
...
Happy Coding :)
--
File not found: (R)esume, (R)etry, (R)erun, (R)eturn, (R)eboot
Vjeran wrote:
thank you Pedro and Johnny, it's working now...
"Pedro Graca" <he****@dodgeit .comwrote in message
news:sl******** ***********@ID-203069.user.ind ividual.net...
>["Followup-To:" header set to comp.lang.php.] Vjeran wrote:
>><?php $result = mysql_query("se lect * from news WHERE news_id='$new s_id'") or die (mysql_error()) ; while ($row = mysql_fetch_arr ay($result)) ....
It appears you have register_global s on. http://php.net/register_globals
*Turn it off!*
And change your code to:
<?php $result = mysql_query("se lect * from news WHERE news_id='".$_G ET['news_id']."'") or die (mysql_error()) ; ...
Happy Coding :) -- File not found: (R)esume, (R)etry, (R)erun, (R)eturn, (R)eboot
.... but as I said to somebody else,
"doesn't work" doesn't tell us anything!
Colin This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Duane Winner |
last post by:
Hello all -
I'm having a small problem with the mysql startup script that ships with
MySQL-3.23.56-1.
I'm running on RedHat Linux.
It works fine, but I have a backup server that runs a script that passes
these commands remotely through ssh:
(1) ssh dbsys-dc "sudo /etc/init.d/mysql stop" (2) ssh dbsys-dc "sudo tar
|
by: Tiffany Wilkes |
last post by:
I solved the problem--I needed ( ) around the column list. I think
the manual should make that more clear.
-------- Original Message --------
Subject: column privilege problem
Date: Tue, 05 Aug 2003 15:39:54 -0700
From: Tiffany Wilkes <tdwilkes@ucdavis.edu>
To: mysql@lists.mysql.com
|
by: Annie Xie |
last post by:
1> anyone has a compiled tarball for mysql new version (-4.0 up) for
solaris 2.6 can be shared? The OS was patched latest.
2> I'm trying build it, configure w/o any problem. However, when dong
make, it failed w/ error:
make: Entering directory `/software/pkg/mysql-4.0.14/client'
source='mysql.cc' object='mysql.o' libtool=no \...
|
by: Gary Cote |
last post by:
>Description:
I've recently compiled mysql 4.0.14 on redhat 8.0.
The installation fails, however, when running mysql_install_db.
I've attached a transcript below.
I gather from searching the 'net that this isn't an entirely
unusual thing to happen, and is likely the result of some
misconfiguration on my part, or perhaps a version...
|
by: Amadeus |
last post by:
Hello Everybody!
I have a problem with MySQL servers running RedHat 9 (smp kernel 2.4.20)
on Intel and MySQL server 4.0.14 (problem also appears on binary distr
4.0.15 and on 4.0.15 I bilt myself from source).
I have few big tables with BLOBS and regular table 4.2 and 2.7 Gb
respectively, plust several smaller tables. Every time I run query...
| |
by: smsabu2002 |
last post by:
Hi,
I am facing the build problem while installing the DBD-MySql perl
module (ver 2.9008) using both GCC and CC compilers in HP-UX machine.
For the Build using GCC, the compiler error is produced due to the
unknown GCC compiler option "+DAportable".
For the Build using CC, the preprocessor error is produced due to the
recursive...
|
by: Lynton Towler |
last post by:
Hello and thanks for reading this message.
I have a Virtual Learning Environment (VLE) called "moodle 1.5.2" running on
a server with 1Gb of RAM and MySQL version 4.1.13-1 which has been
performing fine for a couple of months. The OS is a modern Linux distro
called Crux.
Recently the VLE has started to be used heavily and I am now finding...
|
by: Juan Antonio Villa |
last post by:
Hello, I'm having a problem replicating a simple database using the binary
log replication, here is the problem:
When the master sends an update to the slave, an example update reads as
follows:
UPDATE MainInfo SET dAddress='38 Holland Blvd', dCity='miami',
dState='FL', dZip='33000', dCountry='USA', dPhone='999987565',...
|
by: jepler |
last post by:
I find myself in a circular reference loop that I can't seem to resolve. I recently upgraded from MySQL 4.0.x to MySQL 4.1.21 on OS 10.3.9 Server. Then, I *thought* I set my open master root password correctly using usr/local/mysql/bin/mysqladmin -u root password new_password and /usr/local/mysql/bin/mysqladmin -u root -h `hostname` password...
|
by: geert |
last post by:
Hi all,
I have a mac mini running maocosx 10.5 leopard I want to deploy a
django project on. My backend is MySQL, and I have it running as a 64-
bit app. Of course, apache2 is also running as 64-bit.
MySQLdb installs with the usual warnings after applying the various
patches I found here and there. These patches consist of altering...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |