Hi, here is my solution (one of the possible) it is tested so it should work
fine:
?php
$recordset=mysql_query($query);
$num_righe=mysql_num_rows($recordset);
// here starts the dinamyc table
echo TABLE align=\left\ border=\1\ cellspacing=\2\ cellpadding=\2\
width=\80%\\ntr;
$record=
Sorry for mystakes, (shame on me, i said i was new) using Object array,
here is a working version (tested) with use of array.
Bye
$recordset=mysql_query('SELECT * FROM my_tabella'); // or whatever query is
/* define an array with fields to be shown on top of page. Attention
...values name
I see one bug in your code , that is you never rewind the pointer of
mysql_fetch_array($result), so at the end of the first cycle ...while
($r=mysq...)... the pointer is at the end of the query resource. You should
use mysql_data_seek($result,0) to rewind before doing another while cycle.
Hope it
You may try with this:
?php
ob_start();/* buffer the output so no header is sent until the script is
complete*/
session_start();
if (!session_is_registered('_isLoggedIn')) {
header (Location:viewer.php?type=login);
} else {
// do the stuff to submit a problem if they have
// logged in and have
Hi here is my logic, i haven't tested but it should work (i hope)!!!
i'm not sure if it works only on php5...!?! Let me know if it is a complete
crap i've just started learning php.
Bye
$recordset=mysql_query($query); // whatever query is
$obj_array=new ArrayObject($recordset);
// get the
Good day list,
I was running a Mysql/PHP DB/Webpage that was hosted on Redhat 8.0
It was a simple DB - only 1 table, and the php page connected and fed data
to it.
Last weekend I rebuilt the server to Fedora Core 2 - using the default
PHP/Mysql/apache installs.
I setup the databases, and
Online I could see everything, and the pages gave the appearance of
working,
however when I went into the DB using PHPMYADMIN to check the status
of the
new data entered, all I found was blank rows ( for the new data since
the
rebuild, all the old data was there) There were the correct number
Hi Larry, Thank you very much for the very quick response, I set my php.ini
file (located /etc/php.ini ) for the register_globals = On (it was off by
default)
Now however I get an error
Error adding entry: You have an error in your SQL syntax near 's spanish
driver is found shot dead, Inspector
Andrew Rothwell wrote:
Hi Larry, Thank you very much for the very quick response, I set my php.ini
file (located /etc/php.ini ) for the register_globals = On (it was off by
default)
Now however I get an error
Error adding entry: You have an error in your SQL syntax near 's spanish
driver is found
The apostrophe (') in your data is, most likely, killing the SQL statement
when it is sent to the server. Use addslashes() around all of your form data
to prevent this and also to help guard against SQL injection attacks.
Ex:
$add = INSERT INTO movies SET
I agree, the slashes are killing the query. I would suggets doing this:
$add = INSERT INTO movies SET
movie_name=\$movie_name\,
genre=\$genre\,
director=\$director\,
star1=\$star1\,
star2=\$star2\,
star3=\$star3\,
Ciao..hi, i would suggest to embed the html code in php like this:
?php
$_your_variable=$row[imgid];
echo
a href=\../images/image.php?img=$_your_variable\
target=\_blank\
onClick=\window.open(this.href, this.target,
\'width=200,height=250\');
return false;\img
Thank you everybody that responded so quickly -
I used the suggestion of Franciccio - and the data is now gow into the db
Thank you very much - I really appreciate the help.
Another question - with this fix in place - do I still need the
register_globals = On ?
Or can I now turn it off?
Thank
Hi Andrew,
Andrew Rothwell wrote:
Thank you everybody that responded so quickly -
I used the suggestion of Franciccio - and the data is now gow into the db
Thank you very much - I really appreciate the help.
Another question - with this fix in place - do I still need the
register_globals = On ?
Or
Hi :)
I am on my second week of php so be gentle
I am creating an XML file out of a mysql query with nested arrays.
Currently I can get 1 element and 1 child with a properly formatted XML
file with the below script .
My question is: How do I add 3 to 4 more child elements to the below
Some of the reason to have register_global on is to easly use variables
sent by post, get, cookie method of a form.
Ex.
form name=form1 method=post action=anypage.php?get_var=1
input type=text name=text_post value=Hello World
input type=submit name=Submit value=Submit
/form
in your code at
Hello,
I am no expert but I believe more information is required, like what
would be the average return of a mysql operation ? How many different
DB's are you accessing ? How many different usernames and passwords for
mysql are you using ??
I believe persistent connections are only
17 matches
Mail list logo