IMO a newbie is someone who read the docs and understood them (at least in
theory) before they attempt to write code, which doesn't seem to be the
case.
On Tue, Jun 17, 2014 at 10:04 AM, Jim Giner
wrote:
> We're all so eager to help out poor Ethan (who many of you know is NOT a
> newbie) but no
On 6/17/2014 10:51 AM, Lester Caine wrote:
On 17/06/14 15:04, Jim Giner wrote:
We're all so eager to help out poor Ethan (who many of you know is NOT a
newbie) but nowhere does Ethan say what difficulty he is having.
The suggestions made so far are great but what are we solving?
I see you have
On 17/06/14 15:04, Jim Giner wrote:
> We're all so eager to help out poor Ethan (who many of you know is NOT a
> newbie) but nowhere does Ethan say what difficulty he is having.
>
> The suggestions made so far are great but what are we solving?
I see you have spotted the original question :)
The o
Finally figured out what the question was!
Here's a better version of your code Ethan:
$phn = $_POST['phone']; // note the quotes on the index
if (strlen($phn) <> 10)
{
echo "Error in phone number entry - must be 10 digits";
exit();
}
$phn = mysqli_real_escape_string($cxn,$phn);
We're all so eager to help out poor Ethan (who many of you know is NOT a
newbie) but nowhere does Ethan say what difficulty he is having.
The suggestions made so far are great but what are we solving?
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/u
s empty it still get ''
(empty) as part of the query
- Original Message - From: "Sylvain Gourvil"
<[EMAIL PROTECTED]>
To:
Sent: Wednesday, September 21, 2005 3:26 PM
Subject: [PHP-DB] Re: newbie question on PHP & Mysql...
Evert Meulie wrote:
Hi!
I
rom: "Sylvain Gourvil" <[EMAIL PROTECTED]>
To:
Sent: Wednesday, September 21, 2005 3:26 PM
Subject: [PHP-DB] Re: newbie question on PHP & Mysql...
Evert Meulie wrote:
Hi!
I've tried your suggestions, but still get the same error message. The
'print_r($result);' t
Evert Meulie wrote:
Hi!
I've tried your suggestions, but still get the same error message. The
'print_r($result);' that I added does not print anything, so that would
explain why I get the errors.
My idea is to call this script with a value, like:
script.php value
Doesn't that put the value
Hi!
I've tried your suggestions, but still get the same error message. The
'print_r($result);' that I added does not print anything, so that would explain
why I get the errors.
My idea is to call this script with a value, like:
script.php value
Doesn't that put the value in $argv[1] ?
Regar
Hi Evert, try:
echo mysql_result($result,0,0), "\n";
echo mysql_result($result,0,1);
You forgot a zero...
Regards, Sigrid
"Evert Meulie" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
> Hi all!
>
> I'm taking my first steps with PHP & MySQL.
>
> Can anyone give me a hint on w
Hi Evert, try:
echo mysql_result($result,0,0), "\n";
echo mysql_result($result,0,1);
You forgot a zero...
Regards, Sigrid
"Evert Meulie" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
> Hi all!
>
> I'm taking my first steps with PHP & MySQL.
>
> Can anyone give me a hint on w
Hi,
I guess you used a single quote over the query so the text, $argv[1],
was entered into the query rather than the value inside it.
try:
$result = mysql_query('SELECT SUM(AcctInputOctets),
SUM(AcctOutputOctets) FROM radacct WHERE username = ' .$argv[1] );
OR
$result = mysql_query("SELECT SU
Hi !
Could you do a "print_r($result)" after your mysql_query ?
Or you sure of your argv[1] ?
Sylvain Gourvil
Evert Meulie wrote:
Hi all!
I'm taking my first steps with PHP & MySQL.
Can anyone give me a hint on why this would not work?
*
$result = mysql_query('SELECT S
i am doing the following for inserting values in MYSQL DB through PHP.
$a = "hello";
$b = 1;
$query = "INSERT INTO tablename (a, b) VALUES ('$a', '$b')";
try this
with best wishes
balwant
- Original Message -
From: Kenn Murrah <[EMAIL PROTECTED]>
To:
Sent: Wednesday, May 31, 2000 2:
Well,
Could be some sort of debugging mode on the PHP running on the
server. On the other hand your script is depending on the fact that
GLOBALS are turned on, which - you shouldnt.
1)
Anywho - you form is using POST, so you should use this syntax :
$_POST["variable"], if using GET the equ
[EMAIL PROTECTED] (J.M. Cocchini) writes:
> $result = odbc_do($connection,"select * from events where id=$id");
> odbc_fetch_row($result);
>
> Am not understanding how to "print()" the fields in the rows, one after
> the next, on the same line, and then do the same with the next record,
> until a
there is no difference between the two!
quote: "
@mysql_query($query)
and
@mysql_query($query)?
"
haha
but seriously, the @ supresses error messages from php, so these will not be
outputted.
No information on why or how, the query in this case, it failed.
you can do this on a per function basis wit
The real reason I'm asking is because I want to design a PHP app that uses a
similar framework to a current Java/JSP app I'm developing, and I will need
to use a controller php file that forwards the request and response objects
it receives to another php.
Java Servlets do this nicely because ins
okay, thanks for help ;-p
fetchrow failed because my query was buggy, the proper syntax for left is
LEFT(something, number)
"Alecs" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> Could some one please check the following code and guesstimate where am I
>
No (not out of the box anyway) BUT the beauty of PHP is its much simpler
than JSP or ASP's server.response() server.request() methods (sorry if thats
not the exact syntax - I haven't done huge amounts of ASP/JSP work lately),
in most cases you simply output the data (i.e. print / echo "something";
Ok, I think I have the solution to your problem.
Try using nl2br() on the data in that field..
Example:
I have a message table that allows one user to send an instant message to
another user on my site. There are several fields, one of which being a TEXT
column (MySQL db). I use a simple textare
have a look at get_html_translation_table() in the php manual.
there is an example of conversion of all special chars so they can be
inserted into the database as text (i.e. £>£) and a cool way of
'decoding' them if you need to write them to a file. A Browser wil interpret
them correctly when the
I wrote this cleanup function:
function cleanup($copy)
{
$copy=trim($copy);
$copy=htmlspecialchars($copy, ENT_QUOTES);
$copy=eregi_replace ("%", "%", $copy);
$copy=eregi_replace ("<", "<", $copy);
$copy=eregi_replace (">", ">", $copy);
$copy=eregi_r
23 matches
Mail list logo