Not to beat a dead horse, but I have a problem associated with
differences between 4.3 and 4.0.6. My local server (Mac OSX) is running
4.3 and has globals off. I designed the code to run with $_SESSION for
my log in pages, and they work fine. Then I had to move the files to a
client's server an
just as a quick fix. I use the following snip to take an array of
choices, enter it into a varchar field (or text if you expect alot) and
extract back to array:
$choicesArray is a list of checkboxes from a form
// put data into table
$checkList = implode(";", $choicesArray);
mysql_query("upd
I'd like to get some opinions from the list.
We run php/mysql on our linux servers located behind a firewall. Many
of our clients have scripts that access their databases via php running
on the hosting server, and the general access is set up as:
$hostname = "localhost";
$database = "clients
One comment is to be sure the destination folder has write privileges
for world.
My typical usage is:
2) // datafile is field name for image/file upload browser
$img_dir = "../photos"; // must be 777 access
if($datafile_name != "") {
if ($datafile_name != "none") {
An "Real World" example of how I do a similar thing might help:
My list with checkboxes (since this is dynamic, I don't know what
numbers are assigned) $itemID is the id of the record from the mysql
table, so the check box name is 'chk_12' for id=12. $checkAll is a flag
if the user selected the
I have a manual and use it plus lots of sample code to work through,
but there are times when we hit a wall and a simple "second set of
eyes" to spot what should be obvious is helpful.
I appreciate having a forum to throw out a question and get a rapid
response. I could have rewritten this prob
Thanks.
My error seemed to be just in the group declaration. Comparing yours
and mine with slight modifications to yours that eventually worked as
desired:
yours:
select e.id, title, min(event_date) as event_date from eventTable e,
dateTable d where e.id = d.event_key group by e.id;
mine:
sel
I have two tables, one contains event information and the other dates
that the event takes place:
| id| int(11) | | PRI | 0 | auto_increment |
| title | varchar(100) | YES | | NULL||
| location | varchar(100) | YES | | NULL
ee;
size = 6 sorted: 1
What I am trying to accomplish is an array('Atomic Coffee', 'Duane's
House Of Pizza','Hi-Ho Tavern','Speak Easy','Village Inn')
Help??
Terry Romine
Web Developer
JumpInteractive.com
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
>
> my improvement is:
> ===
> $counter = 1;
> echo ""; //start of table
> for ($i=0;$i<$num_rows; $i++) //loop through the number of records
> {
> $row = mysql_fetch_array($result); //Get associate row
> echo "$row[0]"; //Print out the NAME
> if($counter =(! $counte
I've run into a sticky case where my query is failing (PHP4.x/MySQL).
I have a table where the price value is imported from an external
source, so I can't change it on the fly, and they embed thousands
seperators (in my case ','). When I try to do a query such as ".. where
price <= '25' ..
Great!! Works like a charm.
Terry
On Thursday, July 18, 2002, at 10:27 AM, Jason Wong wrote:
> On Thursday 18 July 2002 23:18, Terry Romine wrote:
>> I have a form with a multi-line select field:
>>
>
> Use:
>
>
>
I have a form with a multi-line select field:
City;
$cityCode = strtolower(eregi_replace(" ","_",
$city));
$cityName = ucwords(strtolower($city));
just checked and the server is running Apache 1.6.19 and PHP 4.0.6
Terry
On Wednesday, July 3, 2002, at 09:52 AM,
[EMAIL PROTECTED] wrote:
> Trust me this does not work with php 4.2.1 and apache 2.0.39 from what
> I am told if you get the cvs for apache 2.0.4 it should but I just down
> grad
as in
if (!isset($_COOKIE['user_data'])) {
setcookie("user_data","",time()+(3600));// set for 6 weeks
*24*7*6
}
??
nah.. that doesn't work either. It still creates a new cookie.
On Wednesday, July 3, 2002, at 10:05 AM, [EMAIL PROTECTED] wrote:
> Is this a
1) no, the commented
setcookie("user_data","",time()+(3600));// set for 6 weeks *24*7*6
I would move the *24*7*6 back into the (3600) to make it so. I just
want to test for an hour
2) so maybe this is a problem with the server? I've been tearing my hair
out because neither cookie
I'm having a problem with cookies over several pages. I've tried to set
them up per the manual, ie: prior to header, and using
setcookie('cookiename',$value,time()+3600). The cookie seems to be
created fine on the first page, and passed to the second page, but is
not maintained when the pages
to the database. Anyone know a way around
>> this? Do I have to send each string through a parsing routine before
>> assigning my string to a variable that will be used in a SQL statement?
>>
>>
>> Thanks,
>>
>> Blaine
>>
>>
>>
ot;;
>>
>> Then do:
>> echo '
>> Header("Location: original_location.php");
>>
>> You can't have any html previous to the Header command, though.
>>
>> This will return you to your original page where you can do your select
>&g
t; can handle.. is this a concern??
>
> Setup: "OSX Server 10.1.4, PHP 4.2.1, Mysql 3.23.46"
>
> Cheers for any advice!
>
> Daz
>
Terry Romine
Web Developer
JumpInteractive.com
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
r phpwizard
> if not, there's plenty of source code for existing shopping cart systems
> around these sites, so you can take them and rewrite it to your liking
> and
> design!
> the wonders of open source!
>
Terry Romine
Web Developer
JumpInteractive.com
-
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
Terry Romine
Web Developer
JumpInteractive.com
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
maybe one real one out of hundreds of hoaxes. I always check Symantec's
site for bogus and real alerts.
On Thursday, May 16, 2002, at 06:17 AM, Olav Bringedal wrote:
> --- Craig Vincent <[EMAIL PROTECTED]> wrote: > >
>>>
>>> Sorry for the last email, it seems, this file
>> "sulfnbk.exe" only
. I got it.
Thanks!!
On Wednesday, May 15, 2002, at 11:01 AM, matt stewart wrote:
> don't think you can have an array as a session variable, you'd have to
> set
> it as character delimited string or something.
>
Terry Romine
Web Developer
JumpInteractive.com
--
PHP Dat
May 15, 2002, at 09:57 AM, matt stewart wrote:
> You need to look up $HTTP_SESSION_VARS['name'] - that's how to change
> the
> variables when they are already set..
> i think most people have this problem when they first use sessions!
>
Terry Romine
Web Develo
> i think most people have this problem when they first use sessions!
>
Terry Romine
Web Developer
JumpInteractive.com
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
dated once the
page is processed. If I am calling the same page (select_class.php) to
process the form, does the data get reverted somehow? The data just
doesn't seem to get updated to the form inputs.
What might I be missing?
Thanks in advance
Terry Romine
Web Developer
JumpInteractive.com
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Do I see a semicolon at the end of the while? that won't work...
On Monday, May 13, 2002, at 04:35 PM, Gurhan Ozen wrote:
> while ($row = mssql_fetch_array($rs)) _;_
>
should be
while ($row = mssql_fetch_array($rs))
{
...
}
Terry Romine
We
Couldn't you use
$alt=(!$alt);
echo "\n";
On Thursday, December 6, 2001, at 03:07 PM, Vins wrote:
> if(ereg("1$|3$|5$|7$|9$", $i)) {
> $bg[$i] = "#FF";
> } else {
> $bg[$i] = "#CC";
> }
--
PHP Database Mailing List (htt
Is everyone ignoring me?? This is the third time I have asked for
assistance on this...
Is there an easy way (say using eregi_replace) to find a link reference
in a blob of text and add the anchor around it? Something like:
"text has a link to a website at
http://www.whatever.com/myd
> Trying again...
> Is there an easy way (say using eregi_replace) to find a link reference
> in a blob of text and add the anchor around it? Something like:
>
> "text has a link to a website at
> http://www.whatever.com/mydirectory/mypage.html ..."
>
> and converts it to
>
>
Is there an easy way (say using eregi_replace) to find a link reference
in a blob of text and add the anchor around it? Something like:
"text has a link to a website at
http://www.whatever.com/mydirectory/mypage.html ..."
and converts it to
"text has a link to a websi
o
secondary file gets created.
On Wednesday, October 24, 2001, at 11:05 AM, Terry Romine wrote:
> I have a small situation where it would be good to be able to embed a
> perl routing in a php script. Is this possible? Or do I need to pass
> control from php to a perl script and re
I have a small situation where it would be good to be able to embed a
perl routing in a php script. Is this possible? Or do I need to pass
control from php to a perl script and return?
A quick synopsis would be (in pseudo code)
Alternatively, is there a module that can take a pdf file and m
I've had problems enough with uploading files that I find the following
checkpoints VERY important:
1) directory privileges (you indicate you have those set 777
2) the tag needs:
a) enctype = "multipart/form-data"
b) method = "post"
HTH
Terry
On Thursday, May 24, 2001, at 12:1
I normally work PHP/MySQL but now I have a customer that is adamant
about keeping their data in an Access DB. I tried to use ADODB to do
generic access scripts, but that doesn't seem to work out for me. I get
an unsupported function just trying to make a connection. One problem is
that my serv
But how do you set it so a webuser would run sudo? That sounds pretty
dangerous, to me.
I have a similar situation where I want PHP to create a subdirectory and
set privileges to it based on the login user. I end up having to create
the directory by hand via SSH and then run the php script.
T
I have a strange situation--
I have a php page that submits form data to MySql database and sends an
email confirmation on completion.
It works fine, but there were several people at one site that although
the emails indicate the data was submitted successfully, the data never
showed up in the
On Thursday, March 29, 2001, at 04:58 PM, Scott Kalbach wrote:
> I have the individual queries in include files. It does the first 2
> queries
> fine,but when it gets to the third, the value of $customer seems to be
> gone,
> so I get no result for the rest of the query's. I looked in my scrip
On Thursday, March 29, 2001, at 08:32 AM, Nick Davies wrote:
> Doesn't the command return 1 or 0 in success or failure?
>
> You may not have a result
>
> Probably wrong but something like
>
> if (mysql_query($query)) {
>
> } else {
>
> }
What I understand is that the return from the query only
You don't seem to do an insert with the new data.
Terry
On Wednesday, March 28, 2001, at 11:19 AM, Timothy D. Arnold wrote:
> I believe that the problem is in the following batch of code...
>
> Thanks,
>
> Tim
> [EMAIL PROTECTED]
--
PHP Database Mailing List (http://www.php.net/)
To unsubscr
I like your simplicity and straightforwardness.
My code tends toward:
switch($submit) {
case: "Accept":
.. insert record
break;
case: "Delete":
.. delete record
break;
case "Cancel":
.. cancel
"select data_name,data_number from myTable order data_number DESC"
The "DESC" is descending.
HTH
Terry
On Friday, March 23, 2001, at 03:02 PM, Sunil Jagarlamudi wrote:
>
> I am trying to read a file which has two columns with names and numbers and
> I am trying to sort them numerically, wi
check where you are getting "$mysql_link" that is the problem I usually associate with
the error you report.
if $mysql_link is undefined, MySQL can't perform the query.
Terry
On Tuesday, March 20, 2001, at 12:06 AM, Toke Herkild wrote:
>
> $mysql_result = mysql_query($query, $mysql_l
even better to use:
echo("\$PASS = $PASS\$PASSNOG = $PASSNOG");
which will show the variable name whether it has anything defined or not.
Terry
On Wednesday, March 14, 2001, at 03:21 PM, Ivo Stoykov wrote:
> Hi Duky
>
> Try to add this before if statement
>echo("$PASS$PASSNOG");
45 matches
Mail list logo