Jump to content

Easy webpage edit


Danny Relic

Recommended Posts

I'm completely new to PHP, and have just one thing that needs to be done.  I do plan on eventually learning PHP, but for now, I need this.

 

I'm a Visual Basic programmer, and am making a program that will enter data into a website.  I do own the website, however I want the site to update (add the entered data to the bottom of the page) the page as soon as it is submitted.

 

Basically, I need a script that will add a string of text (entered in an on page textbox) to the bottom of the site.

 

With this, I plan on duplicating the post data in my program so that I can do this automatically to my website.

 

I hope that is not too complicated to do, nor is it too complicated to understand!

 

Thanks a bunch!

 

Danny

Link to comment
Share on other sites

You guys.., Give him a break(for now), at least give him a place to start looking.

 

You could use a php script to get the data from a text file(txt), and display it.

I had done VB6 a long.. time ago and can't remember the networking.

I know you can use VB6 to open and write files, if the same with networking, you could write the forms post data to the text file you have on you're website.

 

For the reading of the text file, try foreach, fopen, you will see similar functions when you goto the php.net website.

For the VB6, eeek, I can't remember.

 

Hope it helps.

Link to comment
Share on other sites

You guys.., Give him a break(for now), at least give him a place to start looking.

that's what the link i gave him was for :)

 

if he wants a more specific link regarding file handling, try this: http://devzone.zend.com/node/view/id/636.

 

as for specific functions, instread of the fopen(), fread(), etc., try file_get_contents().  it will load the file and read the contents as string into a variable.  straight from PHP Manual:

string file_get_contents ( string filename [, bool use_include_path [, resource context [, int offset [, int maxlen]]]] )

 

Identical to file(), except that file_get_contents() returns the file in a string, starting at the specified offset up to maxlen bytes. On failure, file_get_contents() will return FALSE.

 

file_get_contents() is the preferred way to read the contents of a file into a string. It will use memory mapping techniques if supported by your OS to enhance performance.

 

regards.

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.