Jump to content

Recommended Posts

Assuming that the form uses the POST method, first you need to give it an appropriate action (so that it posts to itself:

 

<form name='your_form' method='POST' action='<?PHP echo $_SERVER['REQUEST_URI']; ?>'>
<!-- Your form fields... -->
</form>

 

Then, in the relevant table cells:

 

<table>
<tr>
  <td>Field 1:</td>
  <td><?PHP echo $_POST['field_name1']; ?></td>
</tr>
<tr>
  <td>Field 2:</td>
  <td><?PHP echo $_POST['field_name2']; ?></td>
</tr>
</table>

 

Hope that makes sense...!

Link to comment
https://forums.phpfreaks.com/topic/173390-saving-to-tables/#findComment-914020
Share on other sites

Thanks. Been searching everywhere for that. Also, forgot to mention that i want users to be able to directly edit those tables, and, i need the page to be saved as a unique php profile page for viewing by others. I am building a user profile system and have hit these little road blocks. Thanks for the help. :)

Link to comment
https://forums.phpfreaks.com/topic/173390-saving-to-tables/#findComment-914021
Share on other sites

Firstly: http://tinyurl.com/n2dnes

Secondly: I'd suggest an easier project. Brainstorming, developing, and maintaining a user profile system with obviously dynamic information stored on a database might be too much for you at first. I'm not sure how much experience you have coding, so please don't take this harshly. I'm trying to be helpful, not rude.

Link to comment
https://forums.phpfreaks.com/topic/173390-saving-to-tables/#findComment-914032
Share on other sites

I posted this question earlier, but i haven't received a response and I'm kinda pressed on time.

 

Did you mean this thread posted a few hours ago didn't receive any responses?

http://www.phpfreaks.com/forums/index.php/topic,268254.0.html Hmmm  :sarcastic:

Link to comment
https://forums.phpfreaks.com/topic/173390-saving-to-tables/#findComment-914038
Share on other sites

Always good to look at alternatives. It's how I learn!

 

You're basically talking about a flat-file database over a MySQL one... You need a few things in order to do this.

 

1. A server that you have super user access on (or the ability to do point 2)

2. A file in a directory on said server that has RWX permissions for all users (probably just CHMOD 777)

3. Good knowledge of fopen (to open your file), fread (to read the contents of it when people are coming back) and fwrite (to add new stuff to it). w3schools has an ok tutorial on the basics of this, and would probably be a good place to start: http://www.w3schools.com/php/php_file.asp

Link to comment
https://forums.phpfreaks.com/topic/173390-saving-to-tables/#findComment-914042
Share on other sites

So let me get this straight:

You'd rather try to make your own clunky flat-file database for fun, rather than break out your self-proclaimed SQL katana and slice every obstacle in your path... even though you have an impending deadline (and obviously neither your PHP manual nor your Google works as well as ours), and you've posted two threads within a few hours trying to learn how to set a $_POST variable (which has nothing to do with impatience, I'm sure).

 

Does that sound about right?

Link to comment
https://forums.phpfreaks.com/topic/173390-saving-to-tables/#findComment-914046
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.