sxyloverboy
May 17 2006, 04:40 PM
Hey i have a little problem with my php script. i dont really know how to make it work ^^; I want to have this exact table: [link] ' I made mysql table that has one column for id(auto-increment, primary key), and then it has row and collumn and text. row means which row in the html table and collumn wich collum. (obviously  ) here is the mysql table screenshoted from phpMyAdmin:  r means row and c collumn  anyways somehow i want to load all those datas into the html table....how do i do this? lol. i tried a few things with a while funciton and some things but my browser always crashed when i opened the page....^^; and now you might be asking why do i want to do all this if i can just have a html table? well the answere is that i want to be able to edit the table better. so if you can also tell me how to do this next thing it would be great. i want to have that table but each table cell should have a text area of a form. and then it loads the info from mysql into it and then you can press save if you changed it and then it updates all of the mysql things. the important thing here is that it loads the data that it already has or when it updates all the fields it would just insert blank stuff except where you changed it yourself. i hope you can all understand this and help me with my problem 
Reply
jlhaslip
May 17 2006, 04:53 PM
Looks to me like you should be looking for a Calendar or Scheduling script which shoud have an Admin section to add/modify/delete entries by date and time. There are already plenty of them available that are written for using with php and mysql. Why re-invent the wheel? Try Hotscripts and the SourceForge sites.
Reply
sxyloverboy
May 17 2006, 05:16 PM
Ingenius. Thanks a lot ill look for a claneder thing. Never thought about that. But now for the actual learning effect. How would be a simple way to do this. Well a bit simple anyways. theres nothing simple about php  im sure all the prefeabricated calender scripts are highly sophisticated and impossible to learn from if you want to learn how to do somehting.
Reply
jlhaslip
May 17 2006, 06:25 PM
A set of nested loops would do it. Look under the php script sub-forum and check out previously posted scripts. I think there have been a couple written for ittsami. Use a SELECT to pull the information sorted by row and column. Use the outer loop to fill the row and the Inner loop to fill each column in that row. An IF statement in the script to check if the cell is empty, etc. Shouldn't be too hard.
Reply
elrohir
May 17 2006, 06:44 PM
Like what you say about the learning effect  I think I understand what you are looking for, have a little try with mysql_fetch_array(), you just have to structure things a little... good explanation at tizag.com. Hope that's what you're looking for
Reply
sxyloverboy
May 21 2006, 08:17 PM
hm yeah i tried witht hat but it dosent seem to work ><
Reply
elrohir
May 22 2006, 04:30 PM
can you get data out of your database normally, as in SELECT and all that stuff?
Reply
sxyloverboy
May 22 2006, 04:44 PM
elrohir
May 22 2006, 04:47 PM
srry, srry, just checking... seems rather strange... do you get an error meassage or just no data?
Reply
sxyloverboy
May 22 2006, 06:01 PM
well i mean i can do it its just that i cant get the table to be like i want it. it always makes it a bit stupid. -
Reply
Similar Topics
Keywords : loading, mysql, data, table
- Create Table - Mysql Code - Help
(1)
Mysql Error
(3) ok i need some more help from the wonderful coders here at Trap. I'm almost done with my CMS
script, but i'm having a problem with the installer.php file, when it trys to inseret the user
data into the database i keep getting the following error: CODE mySQL Error: You have an
error in your SQL syntax; check the manual that corresponds to your MySQL server version for the
right syntax to use near ';INSERT INTO `members` (`id`, `name`,
`username`, `password`, `email`, `title`) ' at lin....
Html Form!
Using MySQL?! (4) Hey, I need your help again! I need some good working tutorial how I can update my SQL through
HTML form. I did use some tutorials online found with the help of google; but they do not work
properly; I mean there are still small mistakes. I need to have a good tutorial to follow. It
should be based on security and more things. It has to be done in proper way.......
Best Php And Mysql Editor For Noobs
anyone any php or mysql editor that is good for noob (6) hi there guys, from my previous posting, i am a noob in php and mysql programming. I want to know
if there are any php and mysql editors which are best for me as a noob. i appreciate your kindness
....
Php And Mysql Programming
anyone knows a code for mysql and php (2) hi everyone! I am making a program using php and mysql...I am a noob on this so i need your
help guys...I want to make a simple program that will some values and then store them on a database
and then retrieve them...uhmm let me give an example out put of what i need. This is the example
say..: Enter First Name: Enter Last Name:
Enter Age: Enter Address: ..those
are the data needed for input values...my question now is how can I make a database....
Best Sites For Learning Php-mysql
(4) Hi I was reminded of this earlier by a post in a topic, meant to post it but forgot and the topic on
php books reminded me. Well anyway there is tyhschools for learning php (unless someone else knows
a better 1) but I wan't to know what is the best site for using php with mysql (using
phpmyadmin) also whats the difference between postgresql and mysql? though I must admit the
postgresql version of phpmyadmin whatever it's called looks better (visually)!....
Tools Needed!
PHP & MySQL (9) Hello, everyone! I need some tools for those two things to test PHP scripts coming together with
database on my laptop, instead checking them on a web-server which takes time.....
Php + Mysql Question!
While inserting data into MySQL, how can I know if the data I'm in (4) Basically, I want to know if the Data I'm inserting through a Form is already there or not. Sort
of a Username registration page. I have this, but it doesn't appear to work... CODE
$result = mysql_query("SELECT * FROM users WHERE
username='$username'"); if($result == 1) { echo
'<h1>ERROR!</h1>The username you have chosen already exists!'; }
....
Mysql Won't Update
(4) Ok, so I'm making some arcade administration software so I don't have to add games the hard
way, well anyway, one of the features I have is that on the homepage is a featured author and as
such I just have it so it updates one line in the mySQL. Well, the page with the form passes on the
varibles fine and the updating page recieves them because I echoed everything, then I build the
query and I even echo the query and it comes out exactly how I want it to, but for some reason, the
database itself won't update even though all the varibles are there. Here's....
[php/mysql]id Trouble [resolved]
(3) session_start(); include "database.php"; if (!$_SESSION || $_SESSION { // User
not logged in, redirect to login page Header("Location: main.php"); } $result =
mysql_query("select * from users order by id asc"); while($r=mysql_fetch_array($result))
{ $username=$r ; $info=$r ; $msn=$r ; $email=$r ;
$id=$r ; $password=$r ; $userlevel=$r ; echo "
user ID User Level U....
[mysql/php]need Som Basic Help
(13) QUOTE session_start(); include "database.php"; include "edit.inc.php"; if (!$_SESSION
) { // User not logged in, redirect to login page Header("Location: main.php"); }
if(isset($_POST )){ $email = $_POST ; $msn = $_POST ; $info =
$_POST ; $updateemail = "UPDATE users SET email = '$email', msn =
'$msn', info = '$info' WHERE username = '$username'";
mysql_query($updateemail) or die("culd not edit your info"); echo "info updated"; } //
Display log....
[mysql]get Id Of Loged In User?
(7) how to get the id number of the loged in user? my db is id. username. password. i have tryed a
few things.. but i never seem to get it right /ohmy.gif" style="vertical-align:middle" emoid=":o"
border="0" alt="ohmy.gif" />....
Php Email Validation
A PHP data validation class with many functions (1) I've been reading through my old php book (PHP 4.1) and came across this data validation class.
It can check a number of things ranging from telephone numbers , credit card number formats, email
address and some others. I checked out some of the methods although I didnt expect it to work 100%
because I've found source code errors thoughout the book and CD. I tested out a few of the
methods to check and some of them did return expected results but some didnt either so the data
validation class was not perfect and it didnt really bother me. The cool thing I found....
The Artists Tutorials :mysql Basic Commands
The Artists is an online programming unit and gfx designing clan. (0) Let's Talk about basic mysql commands used in php. I will now show you a list of the most common
MySQL FUNCTIONS : QUOTE mysql_connect(MySQL server name,username,password) - opens a connection
to a MySQL server. mysql_select_db(database name,connection id) - selects a database residing on
the MySQL server. The database name parameter referes to an active database on the MySQL server that
was opened with the mysql_connect function. The connection identifier is a reference to the current
MySQL connection. mysql_query(sql query) - sends a query to the currently ac....
Using Multiple Selection Array In Table To Order Data
Using multiple selection array in table to order data (1) have a form that has a multiple select choice, like this: CODE <form method="post"
action="display.php" <select multiple name="selectsort[]">
<option value="code">Code</option> <option
value="amount">Amount</option> <option value="dateammended">Date
Ammended</option> <option value="expreviewdate">Expiration/Review
Date</option> <option value="effectivedate">Effective Date</option>
<option value="e....
Problem With A Mysql Join
Problem with a mysql join (2) Hello I am trying to write a script whereby I can pull an image out of one database table and
display it in relation to its category_id in another table. I am using a my_sql join function that
is joining the tables correctly, however it only shows the one same image from the top field of
those combined rows on every single page. I need it display the image according to its category_id
for that particular page. I am thinking I need to set variables to represent those specific rows but
I'm not sure how to do that. Here is my code CODE { $result = mysql_que....
Getting Php 5 To Work With Mysql
getting PHP 5 to work with MySQL (0) Just thought this would be of extreme help to those who are planning to migrate to php5 and still
continue using MySQL same way as before:.... to get mysql work with the php 5 copy
/dll/libmySQL.dll to the directory where php 5 resides and copy the /extensions/php_mysql.dll to the
directory where php.exe resides.(if you can't find the two above files probably you are using an
old release of php 5.you should check for latest at :http://snaps.php.net/) in additon uncomment
extension line in php.ini and add the following code to a gnereal database file(dbcon.php) in m....
Php And Mysql Applications
(3) Ok I have started useing PHP and MySQL recently and I am wondering how I go about createing an
application. I looked for tutorials and guids at w3schools.com but couldnt find what i was looking
for. All I really need is a list of a few steps to take to get a general idea on were to start when
makeing an application. I would appreciate any help you may have to offer.....
Php, Mysql, Apache
(4) ok, i am hosting a smf (simple machines forum) and in order to do so, i need apache, mysql and php
installed. so i got apachefriends xampp. it works, but idk where to go from there. am i ready to
just host and stuff. or do i need to do a couple more things. basically what i need is a guide on
how to set up a php website. or just confirmation that all i have to do is load the files onto the
website, then im ready to go. thank you....
Some Mysql Basics
(4) Greetings this tutorial will show you some mysql basics.. MySQL is one of the most used database. a
simple config file at the top add this CODE <?php ?> after <?php add
$username= "root"; // Username that has access to your database $password=
""; //Password that has access to your database $host = "localhost"; // The
host where the database is (mostly this is localhost) $db = "databasename"; //
The name of the database where you want to work with //connect to the database mysql_connect(....
Simple Mysql Query Limiting
(9) Simple MySQL Query Limiting CODE <?php // If mypage?limit=blah is not defined returs 5
if ( $_GET['limit'] == NULL ) { $limit = 5; } // Else else {
$limit = $_GET['limit']; } $query = mysql_query("SELECT
* FROM members LIMIT '$limit'") or die(mysql_error()); while
($sql = mysql_fetch_array ($query) ) { echo
$sql['mem_name'] . '<br>'; } ?> Have fun......
What Does This Do?
$ban = ($data->login) ? $lban : $iban; (4) I'm correcting a 'few' php-files for a friend, but I got this line of code: CODE
$ban = ($data->login) ? $lban : $iban; and I don't know
what it does xD Could someone please explain me what this line does? Thanks....
Mysql Query
(2) theres a bug somewhere in this query and i can't seem to find it. does anyone else see it?
CODE $query = "insert into templates
(tuid,tname,tdescription,template,archivedefault) values (1,'Sample Archive
Template','A sample archive template that only shows the name of the article with a link to
the default article viewer.','<a
href='viewarticle1.php?aid=[id]'>[articletitle]</a>',FALSE
41;"; ....
Problems With Data Formatting
(2) I have a MySQL database which stores articles. A sample article would look like this: CODE This
is a body. This is a body.This is a body.This is a body.This is a body.This is a body.This is a
body.This is a body.This is a body.This is a body.This is a body.This is a body.This is a body.This
is a body.This is a body.This is a body.This is a body. This is a body.This is a body.This is a
body.This is a body.This is a body.This is a body.This is a body.This is a body.This is a body.This
is a body.This is a body.This is a body.This is a body.This is a body. That'....
How Good Is This Data Cleaning Function?
(2) Hi all, this is my first function and as part of a script and i just want to know a couple of
things. here is the code for the function: CODE <? function
clean($dirty_string) { $muddy_string = stripslashes($dirty_string);
$murky_string = strip_tags($muddy_string); $clean_string =
htmlentities($murky_string); }; ?> So the first thing is how secure is
it? the script this will be used in connects to a database and sends an email so it needs to stop
SQL injections and any email ab....
Php Search Engine Script For Mysql Database
(11) A search engine is provided to facilitate the user with undemanding and clear-cut search options.
The search facility includes simple search, search by title, search by word/phrase, ect… Thus, the
user is at a safe distance from the risk of selecting files/folders ambiguously. In addition, a
history of recent searches can be preserved for future perusal. Now
day’s visitors have a large option for his needs on internet and so visitors are not vesting their
time by following the dead links on your site. So a search engine is essential for your....
Creating Profiles In Php/mysql ?
(7) i've started to learn php..im familiar to basics of php and mysql now.Now for example i want
that some user can register to my website , and after that he can Login and log out , and he can see
his profile.is there any tutorial about this ? or any helping url .. or any helping answer please
/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />....
Can You Add Images Into A Mysql Database?
Using Php? (20) I'm learning php in class right now, but I'm still not that good at it, what I'm
wondering is when I write the php so that it can connect with a database, can I at the same time
have it that it is able to display back images that I choose. Like, I want a search feature, where
you can search for a keyword, and it will bring back a list of all the possible entries with that
keyword, but each of these entries will have a photo associated with it. Now, do I put these image
files directly into the database, or do I write the code to link them from my files to th....
Increment A Mysql Column
how to increment a MySQL column one unit (6) Hi, I have a column in a MySQL table which contains a counter of the views of the object described
by this table. I would like to increment this value by one everytime the object is viewed. Obviously
came into my mind the possibility of retrieving the value of this field, store it in a variable
increment this value by one and perform an UPDATE query again with this new value. My question is if
there is a MySQL option to update the field with its actual value plus an unit increment. I hope you
understand the issue.....
Problem On Mysql "order By"
(5) Can someone please help...? I have a problem with using "ORDER BY" in mysql... CODE SELECT *
FROM `foo` WHERE b='abc' ORDER BY 'number' ASC i want to sort the table out by
the value in "number" which is a number.. but it came out to be sort by like this way...
1->10->2->20 it only sort out the front digit.... but what i want is it will sort by how great the
number is like this... 1->2->3........->10....->20 sorry my english isn't good enough...to
describe my problem properly... hope you can understand and help me on this.....thx....
Looking for loading, mysql, data, table
|
|
Searching Video's for loading, mysql, data, table
|
advertisement
|
|