473,785 Members | 2,235 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

I want to edit the table content from www level.

I need to create the table and I want to edit its content from www
level.

Here is some example:

http://www.rootshell.be/~flash44

There is a table.
Is there possibilty to edit the content using <input> command?

Could you show me the way how to do it?

My vision is:
User has its login and password. When he logs in the table space opens
and he can edit the content.

I need a few lines of code for example or url with similar idea.

Best regards.

Rootshell.
Jul 17 '05 #1
2 1810
This is an easy solution, but unfortunately it involves some of tedious
work.

Basically you are delving into content management. You want to split
your site in half: with a front end and a backend. The front end
obviously will show your polished finished product to the world and the
backend will be the admin side.

Now the fun begins. This should be pretty basic and easy to
understand. For each table cell, there are two states: public and
admin. Your table will show its contents based on its state. Its
state can only be changes if the right admin is logged in.

This will require a simple relation in a database. Create a table
called 'admins' and fill it with user data (name, Password, Login,
email, etc...) and tie it to a 'content cell' in your table. An
example would be a field called 'f_cellID'. You could even make these
cells in the database, so your script would assemble the entire table
dynamically. But for now, lets focus on the task at hand...

For each cell in your table, you are going to box it in php and set
content via the script...for example:

<td id="1">
<?php
// assuming you know who the admin is from a login script
if ($adminID == 1) {
include ("link_to_your_ form.php");
} else {
// function to display data
displayData();
}
?>
</td>

The include file will just be a small form.
<form method="POST" action="file_th at_handles_data .php">
<textarea name="my_text"> STUFF</textarea>
<input type="hidden" name="adminID" value="1">
<!-- the admin ID is pulled from the database after a successful
login -->
<input type="submit" value="Submit">
</form>

Of course for each cell, you will have a different value: 1, 2, 3, X,
Y, Meatwad, Frylock, etc...

When the admin logs in, you will need to create a session admin so that
script kiddies dont trash your site. Validation is simple enough:

$attributes = array_merge($HT TP_POST_VARS, $HTTP_GET_VARS) ;
if ($attributes["adminID"] == $_SESSION["adminID"]) {
// the right person is logged in...
} else {
// someone is trying to circumvent your security! (or their session
expired)
}

I'm at work, so this is abbreviated. If you need any more assistance,
post.

Jul 17 '05 #2
This is an easy solution, but unfortunately it involves some of tedious
work.

Basically you are delving into content management. You want to split
your site in half: with a front end and a backend. The front end
obviously will show your polished finished product to the world and the
backend will be the admin side.

Now the fun begins. This should be pretty basic and easy to
understand. For each table cell, there are two states: public and
admin. Your table will show its contents based on its state. Its
state can only be changes if the right admin is logged in.

This will require a simple relation in a database. Create a table
called 'admins' and fill it with user data (name, Password, Login,
email, etc...) and tie it to a 'content cell' in your table. An
example would be a field called 'f_cellID'. You could even make these
cells in the database, so your script would assemble the entire table
dynamically. But for now, lets focus on the task at hand...

For each cell in your table, you are going to box it in php and set
content via the script...for example:

<td id="1">
<?php
// assuming you know who the admin is from a login script
if ($adminID == 1) {
include ("link_to_your_ form.php");
} else {
// function to display data
displayData();
}
?>
</td>

The include file will just be a small form.
<form method="POST" action="file_th at_handles_data .php">
<textarea name="my_text"> STUFF</textarea>
<input type="hidden" name="adminID" value="1">
<!-- the admin ID is pulled from the database after a successful
login -->
<input type="submit" value="Submit">
</form>

Of course for each cell, you will have a different value: 1, 2, 3, X,
Y, Meatwad, Frylock, etc...

When the admin logs in, you will need to create a session admin so that
script kiddies dont trash your site. Validation is simple enough:

$attributes = array_merge($HT TP_POST_VARS, $HTTP_GET_VARS) ;
if ($attributes["adminID"] == $_SESSION["adminID"]) {
// the right person is logged in...
} else {
// someone is trying to circumvent your security! (or their session
expired)
}

I'm at work, so this is abbreviated. If you need any more assistance,
post.

Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
3005
by: Chris Cioffi | last post by:
I started writing this list because I wanted to have definite points to base a comparison on and as the starting point of writing something myself. After looking around, I think it would be a waste of time to start writing yet another IDE and so am now thinking in terms of new features/plug-ins for existing systems. Right now I mostly use Komodo Personal and it's pretty close to being what I want. They don't currently support plug-ins,...
2
1316
by: Rootshell | last post by:
I need to create the table and I want to edit its content from www level. Here is some example: http://www.rootshell.be/~flash44 There is a table. Is there possibilty to edit the content using <input> command?
21
8151
by: Mel | last post by:
i see a lot of stuff going back and forth, tables are easy to use and do exactly what the name says it does ROWS/COLUMNS what is a GOOD reason to use DIVs instead ? thanks Mel
8
9574
by: cool2005 | last post by:
I tried to dynamically add/clone a <tr> from an existing <tr> to a <table> but the problem is that I need to have a "onclick" event handler in the <tr>. I have tried following A. approach 1. 1. find the <tr> that I will insert <tr>s right after it
6
7645
by: F-13 | last post by:
I'm working on a BOM in Access 200 from an example downloaded from from the web. The sample database contains three tables, Assemblies (the list of items needed to assemble any assembly), Components (the list of items recognised by the Assemblies Table)and Output (a table used to display the BOM from a chosen assembly). It works fine but there are no forms. For a user to edit or create a BOM, should there be a form for each assembly of...
5
2931
by: Roy Gourgi | last post by:
Hi, I am used to working in Visual FoxPro and I would like to be able to create a database and store and retrieve information from it. What is the simplest way to do it and what should I be using as there are many choices to choose from. My database will contain a lot of records. TIA
2
2855
by: Peter | last post by:
ASP.NET 2003 In the DataGrid how do I select current cell value in the dropdown box when I click on the edit link, currently when I click on the edit link in the DataGrid the dropdown box appears in the cell, but allways the first item in the dropdown box is shown not the current cell value? How do I make the current value in the cell automaticaly be selected in the dropdown box.
2
4386
by: David | last post by:
Dear All I'm trying to use a multi-select listbox as criteria to either add new record or edit the current record of the destiantation table with each row selected in the box. This works fine for adding a new record but once records exist in the destination table, the routine seems to overwrite the first highlighted record in the destination table with the last highlighted record record, therefore giving two duplicate records. I've...
2
3819
by: Jukka K. Korpela | last post by:
Sub titulo "Re: DIV borders different in IE7 when in td" scripsit Ben C: This seems to be the heart of the matter, and I'm trying to get a real discussion started, by moving the discussion to the right group (c.i.w.a.stylesheets) and changing the Subject line. It seems to me that IE 7, specifically in "standards mode" (!), misbehaves when a table cell has a declared width but the actual width
0
9484
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10350
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10157
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10097
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8983
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7505
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5386
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4055
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3658
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.