[PHP-DB] A timed refresh ?

2001-09-02 Thread Dave Carrera

Hi All,
Could someone please point me to somewhere or give pointers of guidance, to
a way of solving this issue.

I have an array of which shows an image in a place on my page which shows
the next on the list when the page refreshes, this works fine.

What I want to do is have the image refresh on a 5 second timed interval.

So:

I have a list of images i.e..:

image_1.gif
image_2.gif
image_3.gif

Which I want to refresh every 5 seconds

As always I Thank you for any help in advance.

Yours

Dave C


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Really weird problem: cross-server databasing *g*

2001-09-02 Thread Doug Semig

Hi Markus--

It sounds like the provider that only allows local connections to their
database went through some pains to protect their database.  I suggest
talking to them about your needs and not trying to circumvent their
security measures.  Maybe they have a system to open up their database for
you for a monthly fee?

Doug

At 04:42 AM 9/2/01 +0200, Markus Mayer wrote:
Hi folks!

Let's say you have two servers, on the first one (A) you have your website
containig all those nice php scripts and co but only a crazy small database
(2 megs), on the second one (B) you have a really big database available
but the problem, that the provider won't allow you to access the database
from any other place than from your account on B. That wouldn't be the
problem, but B opens pop ups each time, you open a website there - and that
couldn't be the solution.

Has anyone an idea how to access the database on B without opening a webpage
there (and with this, without opening a popup) from server A?

ANY help much appreciated!

Markus Mayer

--Doug's Signature File
~ ~ ~ I'm proud to work for GLISnet,  Michigan's best ISP ~ ~ ~
--1.888.445.4763---8am to 8pm every day---http://www.glis.net--
The views and opinions expressed in this email are my
own and may not be those of my employer.


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] Re: How can you hide database login passwd in your script?

2001-09-02 Thread John Lim

Hello Michael

That's why we use the Zend encoder for additional security. If that is out
of your budget, I suggest compiling the password into an extension.

Remember to unset all variables which contain passwords after they are used,
otherwise a print_r($GLOBALS); could reveal everything.

Regards, john

Michael [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 How can you hide database login passwd in your script?

 I hate having to have scripts with passwords in it that can be viewed by
 others.






-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] Re: MySql database data has html code in it

2001-09-02 Thread John Lim

Hi
Try echo htmlspecialchars($code) to display the html.


Crosswalkcentral [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hello
 Another question for the pros.

 I have a Mysql database which contains a table labled html
 in this table I have some short html scripts
 I have created a search for my scripts and when I Echo them (example code
 below) It only shows me the text and not the html script itself

 Echo ($code);

 Is their another function that I can use to display to contents of this
 variblae?
 I assueme that PHP is trying to process it as part of the echo statement.

 --
 Cross Walk Central
 www.crosswalkcentral.net
 Support Center
 Your Web Hosting Community!






-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] Re: A timed refresh ?

2001-09-02 Thread Hugh Bothwell


Dave Carrera [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I have an array of which shows an image in a place on my page which shows
 the next on the list when the page refreshes, this works fine.

 What I want to do is have the image refresh on a 5 second timed interval.

 So:

 I have a list of images i.e..:

 image_1.gif
 image_2.gif
 image_3.gif

 Which I want to refresh every 5 seconds

I would suggest using JavaScript for this;
something like

html
head
script language=javascript
!--
img = 0;
max_img = 0;
delay = 5000;// 5 seconds

imgnames = new array(
'image_1.gif',
'image_2.gif',
'image_3.gif'
);
images = new array();

function preload() {
var i = 0;
for (name in imgnames) {
images[i] = new Image();
images[i].src = name;
i++;
}
max_img = i;
}

function start() {
setInterval(replaceImage(document.images[abc]), delay);
}

function replaceImage(hImg) {
if (++img = max_img)
img = 0;

hImg.src = images[img].src;
}
--
/script
/head
body onload='preload(); start();')
img name='abc' src = 'image_1.gif'
/body
/html

(This is just off the top of my head; it is untested
and probably not cross-browser compatible, but
it should point you in the right direction).



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] Re: Really weird problem: cross-server databasing *g*

2001-09-02 Thread Hugh Bothwell


Markus Mayer [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Forgot to mention ... the only way to access the database on B is to
connect
 to localhost there.

I would write a script on B that accepts parameters and returns the
results in easy-to-parse form (ideally, the final result you want, with
unique delimiters like ajlmdyour results/ajlmd).

Then the script on A calls the script on
B, parses the page, and gets the results.
No pop-ups.



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] PHP and ms Access

2001-09-02 Thread olinux o

www.phpbuilder.com has an article on this

olinux

--- user [EMAIL PROTECTED] wrote:
 Hello,
 
 I am builing a microsoft access database.
 
 Now wants the compagny I created it for me to use it
 to make dynamic
 webpages. The problem is that I am new at this.
 
 Can somebody please explain the basics of
 integrating a MS Access databse
 with php into a webpage?
 
 I thank you in advance,
 
 TheB'Oss
 
 //Could you please mail the answer to
 [EMAIL PROTECTED]
 
 Thx
 
 
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]
 To contact the list administrators, e-mail:
 [EMAIL PROTECTED]
 


__
Do You Yahoo!?
Get email alerts  NEW webcam video instant messaging with Yahoo! Messenger
http://im.yahoo.com

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] simple form submitting script

2001-09-02 Thread Andrius Jakutis

Hello,

Can somebody send me simple form submitting (sending to email) php script?
It would be nice with some example, how to create entered information
checking, but basic script is good too.

Thanks.




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] Search Results - Next 10 records

2001-09-02 Thread Dennis

Trying to figure out how to limit search results to say 10 records and produce 
a button to show the next 10.  Do you use PHP to do the logic, or should I make 
another table column for a temporary count?  This is what I'm up to so far...

Thanks in advance


function show_all($table, $keyword=0)// initialize to zero
{

  $query_string = select * from $table where keywords like '%$keyword%';
  $entire_table = mysql_query($query_string);
  $count = 0;
  print(TABLE BORDER=1 width=700\n);
while ($cols_rows = mysql_fetch_array($entire_table)) {
 $count++;
  if ($count  4){
print(tr);
print(td bgcolor=azure);
print(font size=3);
print ($cols_rows['num']);
print(/tdtd bgcolor=azure);
print(font size=2);
print ($cols_rows['site_name']);
print(/tdtd bgcolor=azure);
print(font size=2);
print ($cols_rows['keywords']);
print(/tdtd bgcolor=azure);
print(font size=2);
print ($cols_rows['url']);
print(P/td);
  }  

if ($count  3){
print(tr);
print(td bgcolor=silver);
print(font size=3);
print ($cols_rows['num']);
print(/tdtd bgcolor=silver);
print(font size=2);
print ($cols_rows['site_name']);
print(/tdtd bgcolor=silver);
print(font size=2);
print ($cols_rows['keywords']);
print(/tdtd bgcolor=silver);
print(font size=2);
print ($cols_rows['url']);
print(/td);
$count++;
  }
  }

print (FORM METHOD='POST' ACTION='search1.php');
print (INPUT TYPE='submit' VALUE='Next'/FORM);
  print $count;
print(/TABLE\n);
}


?


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] Searching sql database using php

2001-09-02 Thread Devon

As per topic anyone know how to do it?

Cheers



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Searching sql database using php

2001-09-02 Thread Doug Semig

Yes.

If you have a specific question, please post it and I'm sure folks will be
willing to try to help you out.

Doug

At 12:50 PM 9/3/01 +1000, Devon wrote:
As per topic anyone know how to do it?

Cheers

--Doug's Signature File
~ ~ ~ I'm proud to work for GLISnet,  Michigan's best ISP ~ ~ ~
--1.888.445.4763---8am to 8pm every day---http://www.glis.net--
The views and opinions expressed in this email are my
own and may not be those of my employer.


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] html generated web pages

2001-09-02 Thread RSalomo

hello,

how can i make html generated web pages, and control images and format for
that html page?
(for example like devshed, they have link like this:
.../.../some_folder/page1.html).
where can i learn them? i.m a newbie here.

is this has something to do with phplib7.2?

thanks in advance.

rudy


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] Re: Database Function

2001-09-02 Thread Alfredo Yong

look here: http://www.bitmechanic.com/mail-archives/mysql/Jun1998/0387.html

An extract:


Write this:

select * from table_name limit 100
select * from table_name limit 100, 100
select * from table_name limit 200, ( what number you want)..


On Mon, 15 Jun 1998, Joe Walnes wrote:


  Hi. I am fairly new to MySQL. Is there a way to return only certain pages
  from a SELECT query.
 
  By this I mean, suppose a query returns 1000 results, can I refine 
this to
  only results 1-100, or 101-200, and so forth?
 
  Thanks in advance.
 
  -Joe Walnes.



Georgie wrote:

 I have a simple php script that searchs a MySQL database and returns results
 that I made myself and I'm trying to implement code that splits the results
 into x amount of pages, buts it really tricky.
 
 Can anyone give me a link to some code or even better, a search database
 script that I could adapt for my own needs?
 
 Thanks
 
 
 


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] Database Function

2001-09-02 Thread Georgie

I have a simple php script that searchs a MySQL database and returns results
that I made myself and I'm trying to implement code that splits the results
into x amount of pages, buts it really tricky.

Can anyone give me a link to some code or even better, a search database
script that I could adapt for my own needs?

Thanks



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] Re: Database Function

2001-09-02 Thread Hugh Bothwell


Georgie [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I have a simple php script that searchs a MySQL database and returns
results
 that I made myself and I'm trying to implement code that splits the
results
 into x amount of pages, buts it really tricky.

... if you want X results per page, look at the LIMIT clause for your
SQL statements.

If you actually meant X _pages_ (... I don't see where this would be
useful, but hey...) I would check the number of returned results
with mysql_num_rows(), calculate the start-row offset, and then
mysql_data_seek() to the place you want.

Either way, it's actually pretty simple.



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]