Something like this might work:
a href=javascript:history.go(-1)
(To go back 1 page)
Of course if this is a form post, it would repost the data resulting in
that annoying pop-up on most browsers indicating the page is being
re-posted.
Maybe you could write out the post variables to the
Dan Shirah wrote:
Greetins all,
In my form I have an area where the user enters in the payment amount:
input type=Text value= size=20 maxlength=16 name=payment_amount
This is all fine and dandy and works as generically as it can. BUT, the
problem is that I need to make sure the user didn't
I would start with suppling the entire path of for php in the cron. The
path in the cron environment may be vastly different then the path in
your shell environment...
so: /path/to/php file.php
See how that works for you, of course I am assuming it runs fine from
your command line...
-B
Brad Bonkoski wrote:
Jason Pruim wrote:
On Aug 1, 2007, at 9:55 AM, Michael Preslar wrote:
@mysql_connect('localhost', 'user', 'password') or die(Cannot
connect to DB! . mysql_error());
..
cannot connect to DB!Can't connect to local MySQL server through
socket '/var/mysql/mysql.sock' (2)qs
Jason Pruim wrote:
On Aug 1, 2007, at 9:55 AM, Michael Preslar wrote:
@mysql_connect('localhost', 'user', 'password') or die(Cannot
connect to DB! . mysql_error());
..
cannot connect to DB!Can't connect to local MySQL server through
socket '/var/mysql/mysql.sock'
Payne wrote:
Guys,
Got a quick question. I got a sql statement works when I pass it from
the cli. but if I try in php I get nothing.
This is the statement.
Select ip, date, time, CONCAT(city, ', ',country) as location from ips
where country !=' ' and date='`date +%Y%m%d`' order by country
One easy solution would be to get the ID before you do the insert
i.e. in Oracle you would run the query:
select some_id_generating_seq.nextval from dual
and then you would use that id to insert and you would know the id after
that...and the DB would take care of locking and such.
So, check
Jochem Maas wrote:
Edward Kay wrote:
...
But the advert is for a GRADUATE developer ;) Whilst your messages to this
list show you know a lot about PHP, I doubt you've managed to fit a degree
in yet :)
What does a graduate php developer earn in Scotland? and is it
the the piece of
Something like this will get it into a time stamp...and then you can do
your calculations with ease, and reformat...
?php
$str = 20070617T193500;
list($date, $time) = explode(T,$str);
$year = substr($date, 0, 4);
$mon = substr($date, 4, 2);
$day =
Todd Cary wrote:
Is there a function that can parse a comma delimited file into an array?
Todd
http://us.php.net/manual/en/function.fgetcsv.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Daniel Brown wrote:
Tedd,
On all of the *nix boxes I use (and have used) I've had to install
Festival manually, so I would definitely not say that it's commonly
found on
there especially for a server configuration.
But it IS commonly available, so why not just make it a
to support, unless there is some way for PHP to do text-to-speech
translation, which seems way out of scope for a scripting language
On 4/25/07, Brad Bonkoski [EMAIL PROTECTED] wrote:
Daniel Brown wrote:
Tedd,
On all of the *nix boxes I use (and have used) I've had to install
marcelo Wolfgang wrote:
Hi all,
I'm new to this list and new to php programming so sorry if I do
something wrong here :)
Ok, now to my problem.
I've created a query to update a mysql db, and it isn't working, and
it's not throwing me any errors, so I need some help to figure out
what's
CK wrote:
Hi All,
Experimenting with OOP PHP,please be gentle. Attempting to output a
form within a class:
From calculator.php:
!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;
html xmlns=http://www.w3.org/1999/xhtml;
revDAVE wrote:
I apologize in advance, however I know almost nothing about PHP - ( but I am
trying to learn now)...
I am wondering if it is possible to create a PHP page that can:
1 - Get the contents of everything in its own folder at the same level (
just list sub folders filenames - not
Rahul Sitaram Johari wrote:
Ave,
I have a script where I have to provide a Download Link to a file associated
with a record. The common thing between the record filename is the phone
number. But the filenames have dates other symbols besides the phone
number as well. They all do begin with a
:22 PM, Brad Bonkoski [EMAIL PROTECTED] wrote:
I'm sure there are many options...
I'm also assuming you are pulling from a file system and not a database...
So, loop through the directory and do something like this:
$phone_num = XXX
$cur_file = xxx
if( strncmp($phone_num, $cur_file, strlen
Jason Pruim wrote:
Hi Everyone,
First off, I'm using PHP 5.2.0 and apache 1.3.33
I am trying to figure out what format a string is in in a database.
It's a timecard system that I have found on-line and I am attempting
to figure out how to write a script that would give me everyones
timecard
Dan Shirah wrote:
Okay, I thought this was VERY simple, but I cannot wrap my mind around
what
I am doing wrong.
echo $_POST['max_id']; *The echo returns the correct result
*if($_POST['max_id'] ='') { *This is suppose to run the below query if
$_POST['max_id'] is not blank*
$max_id =
.
On 3/27/07, *Brad Bonkoski* [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] wrote:
Dan Shirah wrote:
Should I use something besides mssql_fetch_row to get my result? No
matter
which method I use for determining if the value exists, I still
get no
data
populated to my
Send us the output of print_r($row_info)
feel free to mask out any data values you may wish.
Dan Shirah wrote:
echo $row_info['first_name']; returns nothing.
However I have verified the correct spelling both in the database and
in the
PHP code and they are identical and when I print_r it
result.
use the numeric reference then...
[..] is the index into the array, so if you want John use $row_info[7]
and if you *want* to use the name or associative array
read here:
http://www.php.net/manual/en/function.mssql-fetch-array.php
-B
On 3/27/07, *Brad Bonkoski* [EMAIL PROTECTED]
mailto
Ross wrote:
I want to trim any whitepace and check if it is empty in the same line this
is not working.
if (empty(trim($_POST['_createcategory']))) {
perhaps try:
if( strlen(trim($_POST['...']))) = 0 ) { ... }
don't think empty is the right function for this...
-Brad
--
PHP General
Brad Bonkoski wrote:
Ross wrote:
I want to trim any whitepace and check if it is empty in the same
line this is not working.
if (empty(trim($_POST['_createcategory']))) {
perhaps try:
if( strlen(trim($_POST['...']))) = 0 ) { ... }
don't think empty is the right function
Ross wrote:
Can I put post values directly into insert statements?
$query = INSERT INTO categories (category_name) VALUES
('$_POST['cat_name']);
Yes, although this is not recommended.
What is someone puts a single quote in there? Or some other bad
characters
otherwise... 2
Richard Dunne wrote:
Can anyone tell me where to get support for this?
Here
php5 undefined function pg_connect()
postgresql was not built into your version of PHP.
Perhaps post which platform your run on, and other information like
using a pre-canned binary or are building for source.
?
Should be...but you have to activate it..
find your php.ini file
and look for the line:
;extension=php_pgsql.dll
--remove the ; at the beginning of it!
Then restart PHP and try again.
-B
Richard
- Original Message
From: Brad Bonkoski [EMAIL PROTECTED]
To: Richard Dunne [EMAIL PROTECTED
Alain Roger wrote:
Hi,
I would like to know what is the best solution for my problem.
When a user is connected to a https page and a session is open, if user
close his browser, the session ID is still active in the browser
history.
It means that next time when user will start his browser, the
I think up2date is *not* up2date ;-)
Google for 'yum' and all its flags for usage...
-B
Jonathan Kahan wrote:
Hi all,
I am attempting to start the mysql rpm in Red hat as a first step
prior to downloading and activating the php-mysql rpm. I was
attempting to follow steps based on the link
Helder Lopes wrote:
?php
// Conexão com o banco de dados
include mysql.php;
// Inicia sessões
session_start();
// Recupera o login
$login = $_POST[username];
// Recupera a senha
$senha = $_POST[password];
// Usuário não forneceu a senha ou o login
if($login== $senha= )
{
echo Você deve
Helder Lopes wrote:
In other file
I asked because it might prove helpful to see how that is set because
this appears to be what is causing your error.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
snip...
For the record, I will *never* say one size fits all in the realm of
computer programming...
Consideration 2
If your project is to supply images across several web servers on
different host, then you are caught in a sync problem. Images stored
in a file system must be stored on a
Dotan Cohen wrote:
I need to populate an array with the contents of a directory. The
following code does not populate the $thumbnailFiles array like I
expect that it would:
?php
function listFiles ($directory) {
$files=array();
$dir = dir($directory);
while ($entry = $dir-read()) {
Check out...
http://www.php.net/gd
-B
[EMAIL PROTECTED] wrote:
after we (company I work for) mmoved to new hosting company (dedicated
server), I requested from them to instal php5 with GDlib to be able play
with images.
they did.
and then yesterday (2 months after we moved) I wasn't able to use
[EMAIL PROTECTED] wrote:
Check out...
http://www.php.net/gd
-B
Already did, but didn't find there any answer...
:(
In the Installation section...
To enable support for jpeg-6b add --with-jpeg-dir=DIR.
And read above on that page, for what may/may not be needed to install
this library
I think something like this will work for you..
$start_time = time();
...loop..
if( time() - $start_time 5 ) exit;
-B
Aaron Gould wrote:
I have a script that connects to a networked device via PHP's socket
functions. This device accepts proprietary commands (e.g.: KPRINT,
as seen below),
/stream_set_timeout
Brad Bonkoski wrote:
I think something like this will work for you..
$start_time = time();
...loop..
if( time() - $start_time 5 ) exit;
-B
Aaron Gould wrote:
I have a script that connects to a networked device via PHP's socket
functions. This device accepts proprietary commands (e.g
Dan Shirah wrote:
Greetings,
I have the following code which populates a dropdown box so a user can
select a month. They see the month name and the SELECTED value is the
corresponding numeric value 1-12 for the month. However, the selected
value for January would be 1. I need the selected
Brad Bonkoski wrote:
Dan Shirah wrote:
Okay, when I try the sprintf I get the following error when I try to
save my
form
Incorrect syntax near 's'.
select name=month
?PHP
for ($m=1;$m=12;$m++) {
$months=date('M', mktime(0, 0, 0, $m, 2));
echo option value=\sprintf('%02s', $m
Dan Shirah wrote:
Okay, when I try the sprintf I get the following error when I try to
save my
form
Incorrect syntax near 's'.
select name=month
?PHP
for ($m=1;$m=12;$m++) {
$months=date('M', mktime(0, 0, 0, $m, 2));
echo option value=\sprintf('%02s', $m)\$months/option;
try:
Dan Shirah wrote:
Just when I think I'm getting the hang of PHP, I get confused beyond
belief
:|
Is this working for you guys? When I test my page only 1/2 of the months
show up now. scratching head
select name=month
?PHP
for ($m=1;$m=12;$m++) {
$months=date('M', mktime(0, 0, 0,
Denis L. Menezes wrote:
Dear friends.
I have a site where I have news headers. I wish to count the clicks on the
news headers so that I can see how many times each of the the news has been
viewed. This way I can show the most viewed news.
Can one of you please advise hwo this can be done?
LoneWolf wrote:
I am having a problem where it appears that the session is not being saved
properly.
While on a page, I can start a session and set variables to it. however,
when I go to the next page.. the session variables appear to have been
cleared out.
first page:
session_start();
Skip Evans wrote:
Hey all,
I have the following query:
$sql=SELECT count(*) AS
count,votes.storyID,stories.title,stories.storyID as
sID,stories.approved, stories.story,stories.userID, fname, lname
FROM `bsp_story_votes` as votes, bsp_story_stories AS
stories, users AS usr
Hello All,
I have this Oracle function, and within my code I call it like this:
$sql = BEGIN :result := my_funtion_name('$parm1', $parm2, null, null,
null); END;;
$stmt = $db-parse($sql);
$rc = null;
ocibindbyname($stmt, :result, $rc);
$db-execute($stmt, $sql);
Dan Shirah wrote:
Hello all,
I am trying to pull data and then loop through the multiple results
display
in seperate rows.
My database contains several tables which are all tied together by the
credit_card_id. After running the query, it ties the unique record
together
by matching the
Roman Neuhauser wrote:
# [EMAIL PROTECTED] / 2007-01-18 11:46:10 -0500:
Hello All,
I have this Oracle function, and within my code I call it like this:
$sql = BEGIN :result := my_funtion_name('$parm1', $parm2, null, null,
null); END;;
$stmt = $db-parse($sql);
$rc = null;
Brad Bonkoski wrote:
Roman Neuhauser wrote:
# [EMAIL PROTECTED] / 2007-01-18 11:46:10 -0500:
Hello All,
I have this Oracle function, and within my code I call it like this:
$sql = BEGIN :result := my_funtion_name('$parm1', $parm2, null,
null, null); END;;
$stmt = $db-parse($sql
[EMAIL PROTECTED] wrote:
MD5 is a hasing algorithm.. one-way.. really only good for checking known
values and keeping them 'private', like storing passwords in a database. That
way, if someone breaks into your database, they don't get the passwords, only
the non-reversible MD5 hashes of the
[EMAIL PROTECTED] wrote:
Still.. that has nothing to do with how well known MD5 is (so I stand by my point).
Was not trying to refute your point. Just pointing something out with
regards to the security of MD5 hashes, and what being well known or
at least popular does for you. What you
bruce wrote:
hi...
haven't used php classes.. so this might not pertain.. but do php classes
have the concept of public/private functions?
Not in PHP 4
are the parent functions that
you're trying to access public/private?
-Original Message-
From: blackwater dev [mailto:[EMAIL
[EMAIL PROTECTED] wrote:
hi,
I have query to select products for specific category from DB, something
like:
SELECT prod_id, prod_name,...
FROM products
LIMIT $From, $To
where $From and $To values depend of on what page you are. let say there
are 100 products and I'm listing 25 products per
Ashley M. Kirchner wrote:
Say I have an array containing ten items, and I want to display
them in a table as follows:
5 4 3 2 1
10 9 8 7 6
What's the best way to loop through that array to do that? My
thinking gets me to create a loop for 5 through 1, repeated twice, and
the
Ashley M. Kirchner wrote:
Say I have an array containing ten items, and I want to display
them in a table as follows:
5 4 3 2 1
10 9 8 7 6
What's the best way to loop through that array to do that? My
thinking gets me to create a loop for 5 through 1, repeated twice, and
the
Ahmad Al-Twaijiry wrote:
Hi everyone,
I create a php script that will run every minute (by cronjob) and
update some database tables (php 5, database mysql 5, tables type
innodb)
the problem is that I want this script to run only one at atime (only
one process from this script can run )
for
Edward Kay wrote:
hi all,
Im doing the following dump through PHP:
$output = shell_exec('mysqldump '. $db_database .' '.
$backup_path.$filename);
It doesnt seem to work but when I run the exact same command (with
appropriate values) in the command line it creates the dump file. What
could be
João Cândido de Souza Neto wrote:
Hello.
In the follow code:
$numbers=array(1,2,3,4,5);
foreach ($numbers as number) {
...
}
Inside foreach, could i know if i am in the last element of the array
$numbers?
Sure, maintain a count in the foreach and then compare to
[EMAIL PROTECTED] wrote:
hi to all,
I have table orders with primary key order_id. I have table uploaded_files
with primary key ufid and uploaded files are linked to orders by order_id
column.
I have to list all orders and uploaded files. this works fine:
$query = mysql_query(
select
Deckard wrote:
Hi,
I've burned my brain, checked other sites and come to a code that works.
I ask you, please, to see if this makes any sense and/or can be improved.
I'd really appreciate.
Warm Regads,
Deckard
dbInsert.php:
---
Deckard wrote:
Hello,
I have this code to write three lines in a file (config.php):
$stringData = '$hostname = ' . $hostname . '\n' . '$mysql_username = ' .
$mysql_username . '\n' . '$mysql_user_password = ' .
$mysql_user_password . '\n';
but instead of breaking a line, it appears in the file
.
'$mysql_user_password = ' . $mysql_user_password . \n\n . '?';
The variables contents should be written in the files within quotes, like:
$mysql_username = 'deckard';
This is getting me nuts.
Any ideas ?
Warm Regards,
Deckard
Brad Bonkoski wrote:
Deckard wrote:
Hello,
I have this code to write three
Ross wrote:
$mail_body .= font size=\2\ face=\Verdana, Arial, Helvetica,
sans-serif\ stripslashes($mail_text) /font;
this just returns
{stripslashes(it\'s
a
testss}
$mail_body .=font size=\2\ face=\Verdana, Arial, Helvetica,
sans-serif\ .stripslashes($mail_text). /font;
--
PHP
benifactor wrote:
ok, about five minutes ago i decided to learn classes and delve into php's oop
side.
what i came up with was this...
//start example code
class newsletter {
function send ($email,$subject,$message) {
if ($email) {
echo(the following message was
the ini directive for this is: asp_tags
and it appears you can set them in the .htaccess file on a per directory
basis.
See the user contributed notes on www.php.net/ini_set
HTH
-B
Beauford wrote:
Is there a way I can use % % instead of ? ? for the opening and closing
tags of a php script. I
Chris W. Parker wrote:
Hello,
This is off topic but I wanted to get the list member's opinions on the
subject as it will probably benefit someone else.
Currently I don't use version control at all. What I do instead is have
one directory that contains my development website and one
Have you tried echoing out your query to run on the backend itself?
Maybe there is some problem with how your join is being constructed...
Perhaps a left outer join is called for? Hard to tell without having
knowledge of your table structure and table data...
-B
Dave Goodchild wrote:
Hi all.
Hmm..
in my system, /usr/lib is a sym link to /usr/lib64...
but..
Try this configure option:
--with-openssl[=DIR]
-B
Marten Lehmann wrote:
Hello,
openssl is compiled for x86 on my system, so the libs are in
/usr/lib64 rather than /usr/lib. But configure only looks in /usr/lib
and gives me
Some already good workarounds given for this question...
BUT.
Is it even possible to override a core function?
Like I wrote a function called 'exit' and I got a parser error, which
leads me to believe it is not even possible to override the core
functions. Is this true of ALL PHP functions?
Hello All..
Had this problem in the past, and always programmed around it, but
wondering if there is an easier way.
Good Example:
Creating a setup for connecting to a mysql database. Want to do
something simple to make sure they have entered a valid
username/password for the database.
So,
Stut wrote:
Brad Bonkoski wrote:
Had this problem in the past, and always programmed around it, but
wondering if there is an easier way.
Good Example:
Creating a setup for connecting to a mysql database. Want to do
something simple to make sure they have entered a valid
username/password
Chris W. Parker wrote:
Hello,
Is it a better practice to set flags to determine the action of your
code or is it perfectly acceptable to have your code determine what it
should do based on the existence (or lack thereof) of data?
For example:
?php
if($value == 1)
{
$flag = true;
}
Really depends on how you display the calendar...
if you go day by day building the table cells, then it should be easy
enough because you should already have the date you are working with...
so a query like select count(*) from events where date='date' and if
count is 0 then display it
Ross wrote:
At the mometn I have this
function display_result($module_no) {
$count = 0; //Of course you *should* initialize $count
$start = 1;
$end = 3;
if ($module_no != ) {
$module_no =unserialize ($module_no);
foreach ($module_no as $number = $data) {
$count=$count+1;
Chris W. Parker wrote:
Hello,
Generally (well, actually 100%) I just use whatever version of PHP is
included with a certain distro (Redhat pre-Fedora, Fedora Core, CentOS).
None of the versions I've used have come with PHP5 and I'd really like
to get with the times and use PHP5.
I know that
blackwater dev wrote:
I have a web server and an images server. My web server doesn't have
enought space for the images, hence the images server. I have to
download
properties from a realty database hourly and the data goes in to a db
on my
webserver while the image needs to be taken from
www.phpdoc.org
similar to javadocs, and works pretty well.
-Brad
Paul Zwiers wrote:
Dear all,
With a growing base of previous PHP work (not to be be mistaken for a
framework :) ) I also find myself recoding and reinventing the wheel.
Something I really do not want to do.
I am looking in
Hi Bob,
Based on what you said, I would say the normal coding way of handling
this is with an array.
If you are unfamiliar with them, www.php.net/array would be a good place
to start.
-Brad
bob pilly wrote:
Hi all
Does anyone know if you can assign a new variable name based on the contents
Any insights or tips into this?
httpd: Syntax error on line 232 of /home/www/conf/httpd.conf: Cannot
load /home/www/modules/libphp5.so into server:
/home/www/modules/libphp5.so: undefined symbol: _pcre_ucp_findprop
TIA.
-Brad
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe,
Why not just have another array...
$bag = array();
$item[]
array_push($bag, $item);
then store the bag in the session.
so, you would have count($bag) items in your shopping cart, and you
would be able to easily access them.
Just a thought, instead of munging variable names.
-B
Ed
Check your include_path in your php.ini file.
-Brad
Robert Hicks wrote:
include_path.;C:\php5\pear.;C:\php5\pear
I have PHP5 sure but it is in C:\PHP. I have looked in my ENV and I
have scoured the registry and nothing comes up for php5. So where is
it getting this entry?
:Robert
When loading the array you will only ever get the last record returned...
so count($oarray) will always be 1?
Perhaps something like this:
Function
$sql = ...;
$ret = array();
while($row = mysql_feth_array($reault)) {
array_push($ret, $row);
}
return $ret;
then...
$data = function();
$c =
Yes.
For Mysql..
http://www.php.net/manual/en/function.mysql-connect.php
-B
BBC wrote:
Hi again..
I'm wondering is it possible to make one page which connects to many
DataBase?
If it's possible please tell me where can I get the references?
Thank
Best Regards
I get: (on Linux, PHP 5.1.4)
php cls_t.php
Will buildbrBuildingbrFinished
buildingbrUnsetingbrDestroyingbrUnset completebr
Mathieu Dumoulin wrote:
I posted a bit earlier and did some other tests and now i have a VERY
simple question... check the following code :
Arno Kuhl wrote:
-Original Message-
From: Stut [mailto:[EMAIL PROTECTED]
Sent: 27 June 2006 03:11
To: Peter Lauri
Cc: 'George Pitcher'; php-general@lists.php.net
Subject: Re: [PHP] Controlling a scanner with PHP
Peter Lauri wrote:
Probably nobody, as PHP is a Server Side
This might help...
http://www.php.net/manual/en/function.array.php
-B
Alex Major wrote:
Thanks for your help with my other question, heres a new one for you.
I need to nest a variable, inside another variable. For example:
$($buildingname)level
How (if at all) is this possible?
Thanks.
weetat wrote:
Hi all,
I have simple code below :
It run ok in one of my test server (Red Hat Enterprise) , PHP 4.3.2.
However in the one of production server which have same OS and PHP
version , the code did not display done parsing xml in log file. It
just display starting
If you cron job the script file and perhaps convert it to something like
PDF then you could feed it to the printer through the shell script...
I'm sure there are other ways, just one suggestion from the top of my head..
-brad
Jef Sullivan wrote:
Greetings all,
I have a situation that I'm
Your result variable is a result identifier, not the actual data...
check out:
http://www.php.net/manual/en/function.mysql-fetch-row.php
or something similar...
-Brad
Rob W. wrote:
$query=SELECT switchport FROM network;
$result=mysql_query($query);
$sql_range=array($result['switchport']);
Hello All,
I am using PERL to generate an XML file from a database query. no
problems there.
I then try to use curl to send it to an upload script.
Essentially the command line looks like this: curl -H
'Content-Type:text/xml' -d file.xml server/up.php
for my up.php I am just trying to dump
What version of PHP are you using?
I suspect something less then 5.0 which means the public/private
declarations are not supported...
(So remove 'public' and see if it works)
-Brad
Dave M G wrote:
PHP List,
I am in the preliminary stages of designing my first object oriented
PHP based web
You could just parse the dates out and feed them to mktime(), subtract
the difference between the two (in seconds) and use that to determin the
number of days...
Something like:
?php
$date1=06/01/2006;
$date2 = date('m/d/Y');
echo $date1 -- $date2\n;
list($m,$d,$y) = explode(/,$date1);
$one
Weel, since this is a PHP list I will assume you are checking once the
page is posted/submitted...
off the top of my head, the functions strlen() and isset() come to mind.
-Brad
Ashley M. Kirchner wrote:
I have a form with various fields on it that I want to make sure
aren't empty or
This article has some good information about PHP/XML including validation:
http://www.zend.com/php5/articles/php5-xmlphp.php
-Brad
weetat wrote:
Hi all ,
Thanks to everbody in this group , really help me a lot.
I have a raw xml file from our clients.
My question is how to validate the
if numerically indexed:
$max = count($array);
for($i=0; $i$max;$i++) {
if( $i = 3 )
continue;
else {
//do what you will
}
}
for associative...
$count = 0;
foreach($arr as $k = $v ) {
if($count = 3 )
conitnue;
else {
//do stuff
}
$count++;
}
-Brad
Eric Butera wrote:
On 6/9/06, Brad Bonkoski [EMAIL PROTECTED] wrote:
if numerically indexed:
$max = count($array);
for($i=0; $i$max;$i++) {
if( $i = 3 )
continue;
else {
//do what you will
}
}
Why not start $i at 3 and skip the if else?
you could, just a simple
$ php script.php
OOzy Pal wrote:
How can I run a .php script from the command in Linux?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
My Humble suggestion is possibly:
upon preview, actually post the edited data to a temp table, and then
pull the HTML from the temp table to display the preview page.
Currently you are passing the original content to the preview page.
And You might want to look to see if javascript has any
kartikay malhotra wrote:
Hi All,
Is there a way for the server to notify the client about an event,
provided
the client was online in the past X minutes?
To elaborate:
A client comes online. A script PHP executes (serves the client), and
terminates. Now if a new event occurs, how can the
Perhaps this will help:
http://www.php.net/manual/en/function.mysql-data-seek.php
-brad
sam wrote:
After I've looped through a resource do I have to run the query again
to load up 'mysql_fetch_assoc' or is there some kind of reset
function I can't find?
$q = SELECT * FROM table;
$s =
Why are you forcing the input into the GET variable or the URL string?
Why not just use the post from the form variable??
As for you question...
the answer is yes:
make the submit button a button and onclick=javascript_function()
Javascript_function() {
val1 =
1 - 100 of 207 matches
Mail list logo