This won't work, because the HOST needs to be able to access the files on
your machine, which is a gross security risk, and isn't possible in this
manner.
The only way I can think of that you would be able to do anything useful
like that would be to have an HTML page load an image using
img
of the 'city'
// symbols...
//
// So... what I gonna do to increase the speed ???
//
// --www.kapsul.org--
// DuFronte
//
// -Original Message-
// From: Beau Lebens [mailto:[EMAIL PROTECTED]]
// Sent: Tuesday, December 10, 2002 1:55 PM
// To: '[EMAIL PROTECTED]'; [EMAIL PROTECTED
Look at the section in the manual on how to upload files via HTTP (Under the
Features chapter from memory) for working with the images. a couple other
things to think about;
1. some sort of validation on the images to make sure they are images
(extension/mim-type?)
2. confirm that you can
long story short - you can't
you can only call a function in javascript or some other client-side
scripting language like that, and you would use the onSubmit= attribute of
the form tag.
by the sounds of what you want to do - i would say you would do something
like;
1. load values from db and
// Example:
$foo = BAR;
${'new' . $foo} = some string;
// this should do it i think, in this case creating a var called $newBAR
HTH
Beau
// -Original Message-
// From: Martin Allan Jensen [mailto:[EMAIL PROTECTED]]
// Sent: Monday, 2 December 2002 10:30 AM
// To: [EMAIL PROTECTED]
//
implode accepts an *array* as input, not a string.
you would need to change your $sqlUpdate to be an array, and each statement
look something like;
if($textfield12 != '') { $sqlUpdate[] = textfield12='$textfield12'; }
of course it would probably be easier to just do something like this;
[php.ini]
register_globals=On
Beau
// -Original Message-
// From: Martin Allan Jensen [mailto:[EMAIL PROTECTED]]
// Sent: Wednesday, 20 November 2002 12:41 PM
// To: [EMAIL PROTECTED]
// Subject: [PHP-DB] standart variabels melfunction
//
//
// Hi all,
//
// I have a problem with my
Not that there is actually a question in there...
I assume your question is How do I pass a value from a window which was
opened via JavaScript, back to the window which opened it
Short answer: window.opener -- read up in a javascript reference manual
about this object.
Longer answer
after
did you try echoing the value of $id after you have assigned it?
you may find it's because you aren't connected to your database or something
and also, i am assuming that you are using a recent install/verison of PHP,
because $_GET wasn't available until the last few releases.
beau
//
you can do this as a part of your db query
check the string functions available for your rdbms.
mysql would use something like;
SELECT SUBSTRING(monthname(blah), 0, 3) AS monthAbbrev FROM tablename
from memory
HTH
beau
// -Original Message-
// From: John Coder
you don't see them because they are interpreted as HTML tags, they are
unknown, so they are ignored.
options;
1. View - Source
2. Encode all as lt; (HTML version) and it will display it all
as text, then you can copy-paste it to somewhere else
3. Wrap it all in a pre tag, then follow 2.
*** APOLOGIES FOR CROSS POSTING ***
I haven't done this directly, but I imagine the process would be similar to
working with images, and the same restrictions/rules of thumb would apply
regarding storing them in the db versus storing them on the filesystem, i.e.
store the flash files in the
If it's on MySQL, then the problem is that it doesn't support nested queries
:)
If it's on something else, i'm afraid i don't know :/
Back to MySQL, you can get around that by doing your select author_code
from authorxcat component query, then put the results into 'x', 'y', 'z'
format, then do
just use
?php
$filename = C:\\Documents and Settings\\roslyn\\My Documents\\note.txt; //
note double-slashes
$contents = join('', file($filename));
echo $contents;
?
should work. your parse error is probably because of the \ in your
filename, you need to escape them with another \.
HTH
Beau
\\note.txt, r);
// $contents = fread ($fp, filesize ($filename));
// echo $contents;
// fclose ($fp);
// ?
//
// regards,
// roslyn
// Beau Lebens wrote:just use
//
// $filename = C:\\Documents and Settings\\roslyn\\My
// Documents\\note.txt; //
// note double-slashes
// $contents = join('', file
\\My
// Documents\\note.txt;
// $fp = fopen (C:\\Documents and Settings\\roslyn\\My
// Documents\\note.txt, r);
// $contents = fread ($fp, filesize ($filename));
// echo $contents;
// fclose ($fp);
// ?
// /body
//
// /html
//
// regards,
//
// roslyn
//
// Beau Lebens wrote:what exact
nope - an id is used for other things (like javascript, style sheets, DHTML
etc). They shouldn't affect your variable names.
HTH
Beau
// -Original Message-
// From: Michael Zornek [mailto:[EMAIL PROTECTED]]
// Sent: Wednesday, 18 September 2002 6:41 AM
// To: [EMAIL PROTECTED]
//
i'm running php 4.2.2 and apache2 on my win2k laptop and it appears to be
running fine (stable etc) but obviously only as a dev platform, so not under
any sort of load or anything like that. also not running particularly
complex operations, so don't know about how it will handle that :)
but it
can't you just make the name of the file include a unique identifier of some
sort, or store each user's files in a different directory or something, to
make sure that they can't overwrite each other's (or their own) files?
Or would that not work in your app?
HTH
Beau
// -Original
try phpMyAdmin - nice and easy, although i'm pretty sure there is a direct
command line.
// -Original Message-
// From: Dr. Indera [mailto:[EMAIL PROTECTED]]
// Sent: Wednesday, 4 September 2002 12:21 PM
// To: [EMAIL PROTECTED]
// Subject: [PHP-DB] Upload csv file into mysql
//
//
//
I'd use var inclusions like this;
VALUES (' . $_POST['Name'] . ',
that might help you
// -Original Message-
// From: Shoulder to Shoulder Farm [mailto:[EMAIL PROTECTED]]
// Sent: Monday, 2 September 2002 11:42 AM
// To: PHP Database List
// Subject: [PHP-DB] What's wrong with this
try a little thought...
http://www.google.com/search?sourceid=navclientq=php+mysql+tutorial
// -Original Message-
// From: Bryan McLemore [mailto:[EMAIL PROTECTED]]
// Sent: Friday, 30 August 2002 2:52 PM
// To: PHP LIST
// Subject: [PHP-DB] MySQL/PHP
//
//
// Where can I find a
Scott, can you just do it by sorting your query, then limiting the results
to 10?
ie.
SELECT * FROM tables WHERE somthing='1' ORDER BY date DESC LIMIT 10
should sort highest - lowest date (ie most recent, backwards) and give you
the top 10 results. then if you have the option of flipping thru
Meethoo
as it says in the PHP documentation, you can access a MySQL server whether
it's on the same machine as the PHP install or not.
ie. mysql_connect('localhost', $user, $pass)
OR mysql_connect('111.111.111.111', $user, $pass)
Beau
// -Original Message-
// From: Meethoo Salim
monty,
i found that if you do the command
DELETE FROM table
(with no WHERE clause) it deletes everything, and resets
Beau
// -Original Message-
// From: Monty [mailto:[EMAIL PROTECTED]]
// Sent: Thursday, 25 July 2002 1:34 PM
// To: [EMAIL PROTECTED]
// Subject: [PHP-DB] Resetting
Ruth,
your reference to $_GET('var') is close, but as you have seen - no cigar :)
using the () after GET makes it refer to a function, but it is actually an
array which is automatically created, so you need to use
$_GET['var'] (note the square brackets
as for point 2 (register_globals) did you
Bo,
you have really answered your own question (question 1) all you need to do
is replace http://detination with http://localhost/index.php?id=1 (as per
your examples) and it should send them to the page which triggers the
deletion of the page (if they confirm the box)
as far as q2 goes, you
or alternatively just do something similar to what you did, using either the
in-built array handling, or your own string manipulation
ie.
http://url.com/page.php?var1=foo
http://url.com/page.php?var1=bar
could be either;
http://url.com/page.php?var[]=foovar[]=bar
($_GET[var] will be an array
Chip, a couple ideas
1. why not display the select list something like this
select name=month
option value=00Please Select/option
option value=01January/option
option value=02February/option
...
/select
That way the user sees the names of the months, but your database gets sent
nice,
Jonathan,
most (all?) of the database query-related functions in PHP return a
Resource ID which contains the data resulting from your query. To access
that information, you need to pass the Resource ID thru a function like
(assuming u r using MySQL) mysql_fetch_array() or mysql_fetch_row()
Have
/a';
then on link.php you'd have the array $array[] (with globals) or
$_GET['array'][]
cool
Beau
-Original Message-
From: Adam Royle [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 10 July 2002 9:05 PM
To: Beau Lebens; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] A Simple Question
Just
Also, as far as limitations go, the following are considerations;
1. You can't pass an array using the querystring
2. Multiline variables (ie. textarea contents) are bad
3. There is a limit of 255 or something characters to a URI (someone?)
4. Be careful with the $_GET[] array that Tony
how about when u open the new window (using something like window.open(...))
you make it open a URL something like foobar.php?var1=foo and then on that
page (foobar.php) you can grab the value of $var1 as foo
HTH
Beau
// -Original Message-
// From: its me [mailto:[EMAIL PROTECTED]]
//
Keiran,
A couple possibilities for you;
1. Try referring to the field (in JavaScript) as something like; (might have
to play around with this)
document.existing[groupchoice[]].selectedIndex
2. Make it so that each selection on the select tag is mirrored into
another hidden input field
have you closed all browser windows?
eg. if you open your browser, then spawn a new window (ctrl-n or similar)
then do something with one of them which creates session vars, then close
that window, then open a new one again, the session has probably remained
active because the first window was
make sure there are no # chars in there, unless you have commented lines
out (as below)
# commented line
in phpMyAdmin that is a comment, and the way it reads, if there's a # on a
line, it comments from there onwards (from memory)
HTH
Beau
// -Original Message-
// From: Chase
also, you might like to do some client-side validation before sending it to
the server, in which case you can use somehting like
http://www.dentedreality.com.au/jsvalidation/
HTH
Beau
// -Original Message-
// From: [EMAIL PROTECTED]
// [mailto:[EMAIL PROTECTED]]
// Sent: Friday, 21
Keiran,
in your second page, you refer to $textfile as the thing that you want to
load into the database; this file doesn't exist on the server, so it is
inserting nothing I would imagine.
You need to use something like $_FILES['tmp_name'] to refer to the actual
file, once it has been
have you declared the variables as global int eh function?
eg
function foo($bar) {
global $this, $that, $theOther;
[...]
}
that way $this, $that and $theOther variables are available everywhere
HTH
Beau
// -Original Message-
// From: James Kupernik [mailto:[EMAIL
A cleaner option might be to do this before you get it to PHP at all, via
your SQL query.
Check out the string functions available, there are a number of
substring-style things available, string position etc.
HTH
Beau
// -Original Message-
// From: Ed Gorski [mailto:[EMAIL PROTECTED]]
chris, you'll need to do a little PHP manipulation, perhaps (pseudo)
if -word. (regular expression?)
for each -word
SQL .= NOT LIKE '%word% AND'
endforeach
endif
for each other word
SQL .= LIKE '%word%' AND
endforeach
strip trailing AND
clean up SQL as
htmlspecialchars()
Beau
// -Original Message-
// From: Larentium [mailto:[EMAIL PROTECTED]]
// Sent: Thursday, 30 May 2002 10:40 AM
// To: [EMAIL PROTECTED]
// Subject: [PHP-DB] Truncated Data
//
//
// Hello,
//
// I desperately need help... I've based my entire project on
// the
you have to change the Content-Type header or something (text/html) but the
easiest way is to use a pre-packed class (unless you really want to do it
yourself). Check out hotscripts or just do a google for php mail class or
similar :)
HTH
Beau
// -Original Message-
// From:
if it's only a one-off thing, you could use php to get all table names
(mysql_list_tables) and then go thru and create an array of the names that
match your criteria, then go thru that array and DROP each one progressivly.
HTH
Beau
// -Original Message-
// From: John Hughes
3:14 PM
// To: [EMAIL PROTECTED]
// Subject: Re: [PHP-DB] Link for next db record
//
//
// This line sets $row[rv_space]
// echoTRTDSearch Record by Space Number
// /TDTDnbsp;INPUT size=4
// name=rv_space/TD/TR;
//
//
//
// Beau Lebens [EMAIL PROTECTED] wrote in message
// news:[EMAIL
Memory Leak?
check task manager periodically over that time to see how much memory IIS is
hogging (under Processes - you might have to add the column Mem Usage)
Other than that... my only suggestion would be to upgrade to Apache :)
(and yes, I intentionally use the phrasing - upgrade :)
Beau
Larry, take a look in the MySQL manual (or other SQL reference, but MySQL
has it there)
String Functions
http://www.mysql.com/doc/S/t/String_functions.html
Particularly, look at (no named anchors that I can see :)
LOCATE(substr,str,pos)
ie, you could use perhaps
LOCATE( , yourField, 95)
?
jen,
assuming you are currently looking at a page which is something like
php.php?record=3, then you should be able to just do
a href='php.php?record=?php echo ($record-1) ?'Previous record/aa
href='php.php?php echo ($record+1) ?'Next record/a
and then on the php.php page, you would obviously
basically it means that you have an invalid regular expression pattern in a
regex function.
i think it's something to do with the . * ? + symbols - but just take a good
look at your pattern and somewhere in there it is invalid :)
HTH
Beau
// -Original Message-
// From: Camelia Enderby
there might even be some cool SQL you can use tho, which would avoid having
to get the data out and then put it back in again.
I *think* (don't quote me on this) I remeber seeing something like
UPDATE myTable SET myField = CONCAT(myField + 'new string of stuff here')
WHERE myID='1'
HTH
beau
could you perhaps save the contents directly into a file, then read the file
into the database?
I know for a fact (http://www.dentedreality.com.au/webpad/) that you can use
a textarea to pump more info than that into a file, but haven't tried doing
it straight into a database.
HTH
Beau
//
brandon,
you can only ever upload 1 file per file input box, but you can have more
than one of these input fields per form. you might have something like
input type=file name=file1
input type=file name=file2
input type=file name=file3
that way when you are processing (assuming PHP4+) you can
Dave,
would it be possible (not ideal, but might work) to do something like this;
- user fills out form
- user clicks submit
- submit fires off 2 events, one submits to AFD server, the other opens a
new window, behind the current, submits certain values (the 3 new ones) and
saves them into
SELECT * FROM quotes ORDER BY RAND() LIMIT 1
something like that, take a quick look in the MySQL (or other) docs for the
RAND() function.
HTH
Beau
// -Original Message-
// From: Dan Swensen [mailto:[EMAIL PROTECTED]]
// Sent: Wednesday, 3 April 2002 1:45 PM
// To: [EMAIL PROTECTED]
//
andy, this should be pretty basic - just try something along the lines of
1. SELECT country/codes from DB [1]
2. loop thru those results [2]
a. check if a file called country code-map.gif exists[3], if it
does,
rename[4] it to matching country name-map.gif
b. if
could you perhaps do the select on the first page, then store the results in
a session (array) and just load different indexed portions of the resultset
each page?
only problem there is that you wouldn't get any refreshed results while
browsing those pages - but i don't know if this matters for
Is it perhaps actually MAX and MIN?
SELECT MAX(profit) FROM schemes WHERE revenueexpenses
(not tested, confirmed etc :P)
HTH
Beau
// -Original Message-
// From: Jeff Oien [mailto:[EMAIL PROTECTED]]
// Sent: Tuesday, 12 March 2002 10:20 AM
// To: PHP-DB
// Subject: [PHP-DB] GREATEST,
Ryan,
you need to make all of those calls *before* ANY output has been sent by
your script, otherwise you can't send a header any more. so the TOP of a
script might look like
?php
session_start();
$signor = $monsieur + $madame;
session_register(signor);
// the rest of your code goes here
?
html
JJ,
I seem to recall most people saying that the shorthand works best
$output = `chmod -R 777 *';
HTH
beau
// -Original Message-
// From: Jeremiah Jester [mailto:[EMAIL PROTECTED]]
// Sent: Thursday, 28 February 2002 9:37 AM
// To: [EMAIL PROTECTED]
// Subject: [PHP-DB] accessing
you would need to do a select and find out how much is in the account
first, then do a check on the equation to see if the result is going to come
out negative - if it is, then either don't allow it, or give them an option
to clear the account or whatever, otherwise just go ahead and do the
your checkboxes should pass a value (probably just the filename) and you
could perhaps name them all filenames[] or something, using the array
trick in PHP, so that on the page you submit to, $filenames will be an array
containing everything that was checked.
you can then loop thru the array and
rather than all the hidden fields and stuff you guys are trying to do - why
not just build the array variable you want, then save it into a session, on
the next page, access the session variable and wallah - there's your array,
still in tact and just as you left it (ie. containing all the info
that doesn't eqal '2002', even if they happen to also have
one that *is* for 2002 (ie. my test student has a report for 1999, 2001 and
2002, but still gets selected by that
--
Beau Lebens, Technical Officer
Science and Mathematics Education Centre
Curtin University of Technology,
GPO Box U1987 Perth
what you are referring to actually has nothing to do with PHP Jen - that's
why the manual wasn't much help :)
JOIN is an SQL command, so check out the manual of your RDBMS (ie.
http://www.mysql.com/doc/J/O/JOIN.html for MySQL)
good luck :)
Beau
// -Original Message-
// From: Jennifer
htat's because the delete button is in the wrong place in your code.
if you put an HTML element between the table and /table tags, but don't
enclose it in at least tr and td tags (pretty loose about closing them,
but of course you should always close your tags!) then the browser will
display
try replacing
WHERE display=$custcatergory);
with
WHERE display='$custcatergory');
and also tru echoing the value of that SQL statement (assign it to a var
first) to make sure you are getting the right thing.
HTH
/b
// -Original Message-
// From: CrossWalkCentral [mailto:[EMAIL
are you always refreshing the session on each page dave?
i am pretty sure you need to call session_start() on every page that you
will be accessing the session-based variables.
HTH
beau
// -Original Message-
// From: Dave Carrera [mailto:[EMAIL PROTECTED]]
// Sent: Saturday, 16
i think i saw an article on phpbuilder.com regarding how to set up a good
thing for the path taken - something along the lines of storing IP vs time
vs page hit, then a good method for selecting from the db that shows the
path of the visitor
HTH
beau
// -Original Message-
// From:
have a look at the online annotated php manual under the regular expression
functions, there are *stacks* of examples of using regexps to validate email
patterns
beau
// -Original Message-
// From: CrossWalkCentral [mailto:[EMAIL PROTECTED]]
// Sent: Tuesday, 12 February 2002 12:20 PM
you might find the library at http://www.dentedreality.com.au/jsvalidation/
useful, but you should also perform similar checks server-side using PHP
since if you are that worried about malicious use of your site, people can
easily circumvent javascript validation
// -Original Message-
//
Mike, you have a conflict with your different quote-styles, have a look at
the source code when you output that and you will see what i mean, you need
to do something like this;
echo td ALIGN=\CENTER\a
href=\javascript:launchwin('$row[5].htm','newwindow','height=480,width=640'
you have changed the command from when you do it in mysql to when you do it
in php - you are leaving out the ' quote marks around the date you are
passing :)
// $sql=SELECT TO_DAYS(2001-01-01) AS bar;
should be
// $sql=SELECT TO_DAYS('2001-01-01') AS bar;
HTH
beau
// -Original
apologies for answering such an already-over-answered question, but i feel
that no-one has given a particularly *good* answer, so i'll add mine to the
list. I use this function (as well as a couple others which do similar
things for all form elements;
// Creates an HTML select box of values.
//
not that this has anything to do with databases... ([php-db])
assuming;
1. you are using apache
2. you have command-line access to your server
3. your webhost has htaccess enabled and configured to use .htaccess as
the security file
you should be able to drop a file called (usally) .htaccess
if you could still help me, or anyone else I would
// greatly appreciate it!
//
// Yours,
//
// Kevin
// Beau Lebens [EMAIL PROTECTED] wrote in message
// news:[EMAIL PROTECTED].
// edu.au...
// not that this has anything to do with databases... ([php-db])
//
// assuming;
// 1. you are using
soo what happens with php if you do something like convert them both to
Y-m-d H:i:s
and then subtract one from the other, i have a feeling (haven't tried) that
php will handle the rest for you...
// -Original Message-
// From: SpamSucks86 [mailto:[EMAIL PROTECTED]]
// Sent: Monday, 21
easy peasy dave :) (pseudo-code - cause i'm lazy and hopefully you aren't
:P)
?php[esque]
create file pointer to file 1 (read-only r?)
read file 1 into string
close file pointer to file 1
create file pointer to file 2 (creating if necessary (w))
write string from file 1 to this pointer
// 1. What is the difference between working with PHP and MySQL
// on a local
// server and working with PHP and MySQL when MySQL is on a
// remote server?
none - just specify different hostname in connection call (perhaps IP more
reliable)
// 2. What is the protocol used to connect to MySQL
Hi John - I have come up against this one a number of times, and have found
that the following works pretty nicely - although there may be better ways
out there
- get your records from the db
- loop thru them, using some sort of ID field to print each row in your
table with names something
Jacob,
I think you can do something like
UPDATE tablename SET fieldD=fieldD+1 WHERE pollTitle='title';
or similar?
check the manual on updates and mathematical functions probably
-b
// -Original Message-
// From: Jacob Wyke [mailto:[EMAIL PROTECTED]]
// Sent: Friday, 18 January 2002
if you are using mysql then no i don't think you can do that, since it
doesn't support nested queries - postgres or some other db may well support
it tho
but like miles said - give it a go :) (maybe on a test database/table just
in case)
hth
-b
// -Original Message-
// From: Markus
on a guess - echo the value of $search_name in between each call to see what
happens to it as it goes through - you may find that something is going
haywire in there somewhere (or that it's blank)
-b
// -Original Message-
// From: Markus Lervik [mailto:[EMAIL PROTECTED]]
// Sent:
also - rather than change the ini file, you can just put
?php
set_time_limit(43200);
?
which gives the script 12 hours to run (or however you think you need)
i have a simple script for mailing out bulk mail done in php - it has
successfully worked on 700 emails so far - so it works :)
-b
//
hey olinux -
i did something like this with a mailing list thing i have for a website
(insertfashionhere.com - about to be relaunched) and all i did was ordered
the emails to be sent by their server - as you have said.
mine were in a database, so in my select i did something liek
SELECT email,
i don't doubt that there are probably better ways of going about this chris,
but you can do something like;
?php
$words = explode( , $searchText);
$query = SELECT * FROM table WHERE ;
foreach ($words as $word) {
$query .= field LIKE '%word%' AND ;
}
$query .= field!='' ORDER BY
you need to use the *_fetch_array() functions
i.e. if you are using MySQL
$SQL = something; // build SQL query
$result = mysql_query($SQL); // execute query, save all results in $result
$firstResult = mysql_fetch_array($result); // create an array containing
each returned record
// subsequent
you should be able to just change the mysql_fetch_row to a mysql_fetch_array
and then use the names rather than the numbers in your print (modified
below, not tested :)
// ?
// $user = root;
// $pw = ;
// $db = pete;
//
// $mysql_access = mysql_connect(localhost, $user, $pw);
//
Hi Benny,
I know this is a bit of a run-around again, but try the annotated manual on
php.net, it has some good examples of using things here and there.
Specifically useful functions are
htmlspecialentities()
htmlspecialchars()
addslashes()
stripslashes()
nl2br()
also, as far as using regexps
*being a smart-ass from your email signature*
sure... you can download the script from ..
just kidding :)
the best way to do this as far as I know would be to have a PHP script which
had write-access to your apache conf files, which then just added in the
required lines and restarted
it's better to do something like
0,10,20,30,40,50* * * * /usr/bin/php -q
/home/you/yourscript.php /dev/null
since crontab actually stores the result of it's operations in a file
(/home/you/Mailbox?) so you will bloat your server if you don't clear the
output.
try H as your hour format (date(H)+5)
although out of interest, at 9:51am, using either g or H gives me 2:51
pm
HTH
/beau
// -Original Message-
// From: Matt Nigh [mailto:[EMAIL PROTECTED]]
// Sent: Wednesday, 28 November 2001 9:48 AM
// To: php-db
// Subject: [PHP-DB] date format
if you just echo() the results/messages as you come across them, the page
should incrementally load.
in my experience (IE5?) if there is data being added to the page, then the
browser will display what it can, and keep adding to it until the stream
breaks or it finishes. one thing to note is
should be able to do something like
SELECT whatever FROM whereever WHERE value='50' AND value='45'
is that what you are looking for?
// -Original Message-
// From: Chris Payne [mailto:[EMAIL PROTECTED]]
// Sent: Thursday, 22 November 2001 3:11 PM
// To: [EMAIL PROTECTED]
//
or even
mysql_list_tables()
:)
/beau
// -Original Message-
// From: Rick Emery [mailto:[EMAIL PROTECTED]]
// Sent: Tuesday, 13 November 2001 1:47 AM
// To: 'mike luce'; [EMAIL PROTECTED]
// Subject: RE: [PHP-DB] getting database tables
//
//
// In PHP:
// $query = SHOW TABLES;
//
in PHP, coming out in yyy-mm-dd
date("Y-m-d", mktime(0,0,0, date("m"), date("d")+14, date("Y"));
untested, so please test it - this will ignore hours, minutes, seconds (the
leading 3 0's) and make a timestamp using mktime for this month, this day +
14, this year, then return it formatted as
php doesn't have application variables as such, however there are a couple
options for implementing them...
1. have a single file with your application variables and manually include
that in all files of the project
2. use the session_*() functions to keep the vars alive on pages
3. as you said,
if you have phpMyAdmin then just use that (if you don't then you *really*
should :)
otherwise, yeah just use mysql_query()
or use the command line
of course the second 2 options assume you can construct the SQL command to
do it, using phpMyAdmin you won't really need to know.
/beau
//
// Question 1:
// How to process the confirmation email by clicking the url
// given in the email
// and by replying the email.
when you send them an email, include some sort of confirmation code
ie http://server/confirm.php?confirmCode=xxx
when they click, it passes this code, and you look
carols - true, but to avoid confusion and problem sif your names get more
complex (i.e. i think $$some_name will go crazy, you should always do it
like this
$var_name = game1;
${$var_name}
cheers guys
// -Original Message-
// From: Carlos Augusto Abarca [mailto:[EMAIL PROTECTED]]
//
you mean to use for some sort of header redirect or something?
couldn't you do
1. click link change to secure mode
2. pass the url you just came from with the link (or get it from
HTTP_REFERRER or whatever it is)
3. header(Location: . str_replace(http://;, https://;, $last_url));
or am i
1 - 100 of 157 matches
Mail list logo