Jump to content

Is there any php that sends a file in the browser to the server?


11Tami

Recommended Posts

Hello, Is there any php that sends a page that is open in the browser, to my server?

 

Id like to send information in the updated page onto a directory in my ftp account.

 

If you have heard of anything like this, I'd love suggestions to send me in the right direction. Thanks a lot.

Link to comment
Share on other sites

I thought you could do all sorts of extra if commands while items are being pulled onto a page with php. Because the browser is already talking to the server during that same time.

 

Some data is being put on the page using mysql, php and a form. I was hoping while the data is being pulled onto the page the whole page could be grabbed and sent onto the server with the new data included, through some sort of "if" statement. To any  directory anywhere on the server.

 

Because I am not getting how people are automatically generating new web pages with database data. I know they can't all be doing each page one at a time manually, they have to have some sort of program or script to help. Some sites are way too busy.

 

So either something that will send the database data to web pages on my computer, or upload them to the server.  Anyone know?

Link to comment
Share on other sites

That's totally disconnected from your original question about how you could save a page that's displayed in your browser.

 

php generates an html page and then sends it to the browser.  There's no 'browser talking to the server' while that's happening.

 

Perhaps you need to look at a few gentle php/mysql tutorials that explain how php can abstract data from a database and include it selectively in the html generated and sent to your browser.

 

www.tizag.com has some nice introductory tutorials.

Link to comment
Share on other sites

Thanks, I already know how to get the sql to the page with php. I need to know how all that mysql data now on the page, can then be sent on to the server as a new page.

 

I am pretty sure from what I've heard, some people are generating web pages automatically with mysql data. And not making each page themselves, one at a time. I just don't know how its done.

 

Here's one article that talks about it as a php plug in: http://www.sitepoint.com/article/publishing-mysql-data-web

Link to comment
Share on other sites

Article? What article?

 

What about having mysql data sent to a web page on the computer somehow? Then I can upload them myself?

 

The whole point of drawing data from a database and displaying with html in a browser - dynamic pages - is so that you don't need zillions of fixed html pages.  What would be the point of a database if you want to save all the output as files on your server?

Link to comment
Share on other sites

Thanks, the article I listed above.

 

But I'm sure there is another step. Using the data thats already in a database to put on our templates automatically. So we don't have to make each one from scratch ourselves. I just don't know the code or programs to do this yet.

Link to comment
Share on other sites

I found out all of it can be done, just by using these and mysql.

this page.php?id=1

this page.php?id=2

 

 

 

Good grief!  That is absolutely nothing to do with what you were describing.  No page is being sent from the browser and saved on the server.  What IS happening is that when you click that (kind of) link, the server retrieves the file named thispage.php, determines the value of the variable id, and does 'something' based on its value - gets information from a database, for example.  The generated html code is NOT saved on the server, it's merely sent to the browser.

 

I'm really glad you've found your solution.

Link to comment
Share on other sites

If you were told what you claim then either you misunderstood or you were grossly misled.

 

The script named thispage.php?id=1 does not exist on the server ; the script named thispage.php DOES exist on the server

Link to comment
Share on other sites

Thanks, I'd like to be sure about this before I go to all the trouble of starting it. They said that all these addresses all over the place in google and others proove they search and read these type of pages and all the code in them, as real pages. Exactly like the others. Someone let me if this is not true please and why.

 

www.codingforums.com/archive/index.php?t-36401.html - 4k -

Link to comment
Share on other sites

Thanks, I'd like to be sure about this before I go to all the trouble of starting it. They said that all these addresses all over the place in google and others proove they search and read these type of pages and all the code in them, as real pages. Exactly like the others. Someone let me if this is not true please and why.

 

Of course it's true. Dynamically generated pages (in your browser, not on your server) can be parsed by search engines - some better than others.  What they meant was not 'these type of pages' as in a page named thispage.php?id=1, but pages generated by scripts where parameters were passed were OK.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.