I have a function that will populate the table cells (TD) with data (information) from mysql database.
What I need to do is to allow the user to update the cell information (information was pulled from mysql database) from the table cells (TD) then the data get updated in mysql. So when I pull the data again I can see the new information.
Is there any way to do this using PHP?
---------------------------------
Ahhh...imagining that irresistible "new car" smell?
Check outnew cars at Yahoo! Autos.
--0-1382976478-1178696608=:79176--
Re: Dynamically update mysql field
am 09.05.2007 10:23:55 von Alf C Stockton
sam rumaizan wrote:
> Dynamically update mysql field
>
> I have a function that will populate the table cells (TD) with data (information) from mysql database.
> What I need to do is to allow the user to update the cell information (information was pulled from mysql database) from the table cells (TD) then the data get updated in mysql. So when I pull the data again I can see the new information.
> Is there any way to do this using PHP?
>
Yes I am sure that this can be done but we need more information before
recommending a solution.
--
Regards,
Alf Stockton www.stockton.co.za
The human race has one really effective weapon, and that is laughter.
-- Mark Twain
My email disclaimer is available at www.stockton.co.za/disclaimer.html
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: Dynamically update mysql field
am 09.05.2007 10:49:32 von Aleksandar Vojnovic
Of course it can be done, but please be more specific about what you
wish to achieve.
Aleksander
sam rumaizan wrote:
> Dynamically update mysql field
>
> I have a function that will populate the table cells (TD) with data (information) from mysql database.
> What I need to do is to allow the user to update the cell information (information was pulled from mysql database) from the table cells (TD) then the data get updated in mysql. So when I pull the data again I can see the new information.
> Is there any way to do this using PHP?
>
>
>
>
>
>
> ---------------------------------
> Ahhh...imagining that irresistible "new car" smell?
> Check outnew cars at Yahoo! Autos.
>
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
You can change the information in any cell and submit it to mysql to update the original database.
Basically when the user views his/her information he/she should have the option to change the information.
Aleksandar Vojnovic wrote:
Of course it can be done, but please be more specific about what you
wish to achieve.
Aleksander
sam rumaizan wrote:
> Dynamically update mysql field
>
> I have a function that will populate the table cells (TD) with data (information) from mysql database.
> What I need to do is to allow the user to update the cell information (information was pulled from mysql database) from the table cells (TD) then the data get updated in mysql. So when I pull the data again I can see the new information.
> Is there any way to do this using PHP?
>
>
>
>
>
>
> ---------------------------------
> Ahhh...imagining that irresistible "new car" smell?
> Check outnew cars at Yahoo! Autos.
>
---------------------------------
Get your own web address.
Have a HUGE year through Yahoo! Small Business.
--0-1445197180-1178709511=:2589--
Re: Dynamically update mysql field
am 09.05.2007 13:28:05 von Alf C Stockton
sam rumaizan wrote:
> Copy and paste my code in your editor and run it then you will understand what I need
>
Why do all your field definitions contain 'name="update"' ?
--
Regards,
Alf Stockton www.stockton.co.za
Fame is a vapor; popularity an accident; the only earthly certainty is
oblivion.
-- Mark Twain
My email disclaimer is available at www.stockton.co.za/disclaimer.html
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: Dynamically update mysql field
am 09.05.2007 15:15:30 von Aleksandar Vojnovic
Sorry I still don't understand. Do you wish to display/reload the data
on some timeout (ala AJAX) or you actually wish to update the data from
this form into the MySQL?
Aleksander
sam rumaizan wrote:
> *Copy and paste my code in your editor and run it then you will
> understand what I need*
>
> *<------------------------------------------------start code
> --------------------------------------->*
> *
>
>
> data*
> **
> **
> *
You can change the information in any cell
> and submit it to mysql to update the original database.*
> *Basically when the user views his/her information he/she should have
> the option to change the information.
>
> *
> * *
> *
>
> *
> *<------------------------------------------------End code
> --------------------------------------->*
> * *
> *
> /Aleksandar Vojnovic /* wrote:
>
> Of course it can be done, but please be more specific about what you
> wish to achieve.
>
> Aleksander
>
> sam rumaizan wrote:
> > Dynamically update mysql field
> >
> > I have a function that will populate the table cells (TD) with
> data (information) from mysql database.
> > What I need to do is to allow the user to update the cell
> information (information was pulled from mysql database) from the
> table cells (TD) then the data get updated in mysql. So when I
> pull the data again I can see the new information.
> > Is there any way to do this using PHP?
> >
> >
> >
> >
> >
> >
> > ---------------------------------
> > Ahhh...imagining that irresistible "new car" smell?
> > Check outnew cars at Yahoo! Autos.
> >
>
>
>
>
>
>
> ------------------------------------------------------------ ------------
> Get your own web address.
>
> Have a HUGE year through Yahoo! Small Business.
>
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I think what you're asking is how can you have a form pull data from your
database, populate the form, but then have fields to the side so the user
and update the database based on the user input.
Kind of like a "Change my personal information" page.
I would do it like this:
1. Write your query to pull all your current data from mysql.
2. Assign the output into variables (my_value_1, my_value_2 etc..)
3. Make your form objects have the value you just pulled.
4. Put a submit button at the bottom of the page to save the changes.
5. Upon submit have the page refresh itself to display the new values.
data from mysql : SAM
value="update this cell"> You can change the
information and submit it to mysql to update the original database.
data from mysql :
data from mysql :
data from mysql :
data from mysql :
On 5/9/07, Aleksandar Vojnovic wrote:
>
> Sorry I still don't understand. Do you wish to display/reload the data
> on some timeout (ala AJAX) or you actually wish to update the data from
> this form into the MySQL?
>
> Aleksander
>
> sam rumaizan wrote:
> > *Copy and paste my code in your editor and run it then you will
> > understand what I need*
> >
> > *<------------------------------------------------start code
> > --------------------------------------->*
> > *
> >
> >
> > data*
> > **
> > **
> > *
You can change the information in any cell
> > and submit it to mysql to update the original database.*
> > *Basically when the user views his/her information he/she should have
> > the option to change the information.
> >
> > *
> > * *
> > *
> >
> > *
> > *<------------------------------------------------End code
> > --------------------------------------->*
> > * *
> > *
> > /Aleksandar Vojnovic /* wrote:
> >
> > Of course it can be done, but please be more specific about what you
> > wish to achieve.
> >
> > Aleksander
> >
> > sam rumaizan wrote:
> > > Dynamically update mysql field
> > >
> > > I have a function that will populate the table cells (TD) with
> > data (information) from mysql database.
> > > What I need to do is to allow the user to update the cell
> > information (information was pulled from mysql database) from the
> > table cells (TD) then the data get updated in mysql. So when I
> > pull the data again I can see the new information.
> > > Is there any way to do this using PHP?
> > >
> > >
> > >
> > >
> > >
> > >
> > > ---------------------------------
> > > Ahhh...imagining that irresistible "new car" smell?
> > > Check outnew cars at Yahoo! Autos.
> > >
> >
> >
> >
> >
> >
> >
> > ------------------------------------------------------------ ------------
> > Get your own web address.
> > <
> http://us.rd.yahoo.com/evt=49678/*http://smallbusiness.yahoo .com/domains/?p=BESTDEAL
> >
> > Have a HUGE year through Yahoo! Small Business.
> > <
> http://us.rd.yahoo.com/evt=49678/*http://smallbusiness.yahoo .com/domains/?p=BESTDEAL
> >
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
Aleksandar Vojnovic wrote: Sorry I still don't understand. Do you wish to display/reload the data
on some timeout (ala AJAX) or you actually wish to update the data from
this form into the MySQL?
Aleksander
sam rumaizan wrote:
> *Copy and paste my code in your editor and run it then you will
> understand what I need*
>
> *<------------------------------------------------start code
> --------------------------------------->*
> *
>
>
> *
> **
> **
> * You can change the information in any cell
> and submit it to mysql to update the original database.*
> *Basically when the user views his/her information he/she should have
> the option to change the information.
>
>
>
>
> NAME
> JOB TITLE
> COLOR
> ADDRESS
> PHONE NO
>
>
> data form mysql :
SAM
[input] > name="update" value="update this cell">
You can
> change the information and submit it to mysql to update the original
> database.
> data form mysql :
ENGENEER
> data form mysql :
RED
> data form mysql :
OKLAHOMA
> data form mysql :
405-12452 *
> *
>
> data form mysql :
JOHN
> data form mysql :
DESIGNER
[input] > name="update" value="update this cell">
You can
> change the information and submit it to mysql to update the original
> database.
> data form mysql :
BLUE
> data form mysql :
COLORADO
> data form mysql :
303-5458 *
> **
> *
> data form mysql :
MIKE
> data form mysql :
STUDENT
> data form mysql :
GREEN
[input] > name="update" value="update this cell">
You can
> change the information and submit it to mysql to update the original
> database.
> data form mysql :
UTAH
> data form mysql :
504-5670 *
> **
> *
> data form mysql :
JULI
> data form mysql :
TEACHER
> data form mysql :
PINK
[input] > name="update" value="update this cell">
You can
> change the information and submit it to mysql to update the original
> database.
> data form mysql :
TEXES
> data form mysql :
405-6364 *
> *
> *
> **
> * *
> *
> *
> * *
> *
>
> *
> *<------------------------------------------------End code
> --------------------------------------->*
> * *
> *
> /Aleksandar Vojnovic /* wrote:
>
> Of course it can be done, but please be more specific about what you
> wish to achieve.
>
> Aleksander
>
> sam rumaizan wrote:
> > Dynamically update mysql field
> >
> > I have a function that will populate the table cells (TD) with
> data (information) from mysql database.
> > What I need to do is to allow the user to update the cell
> information (information was pulled from mysql database) from the
> table cells (TD) then the data get updated in mysql. So when I
> pull the data again I can see the new information.
> > Is there any way to do this using PHP?
> >
> >
> >
> >
> >
> >
> > ---------------------------------
> > Ahhh...imagining that irresistible "new car" smell?
> > Check outnew cars at Yahoo! Autos.
> >
>
>
>
>
>
>
> ------------------------------------------------------------ ------------
> Get your own web address.
>
> Have a HUGE year through Yahoo! Small Business.
>
---------------------------------
Ahhh...imagining that irresistible "new car" smell?
Check outnew cars at Yahoo! Autos.
--0-274615091-1178780484=:49767--
to alex.. that's always be my line.. asking what source code..=20
actualy.. that's fine
to sam.. in return try this
data
You can change the information in any cell and submit it to mysql to =
update the original database.
Basically when the user views his/her information he/she should have the =
option to change the information.
this line is same as yours but i change the name to make everyone =
understand.
Yes I am sure that this can be done but we need more information before=20
recommending a solution.
after see the output.. i found what he intend to do..
see the attach.
Sam, what u going to do is.
if user see one of the data was wrong, he/she click on the button (i =
should change the name into Edit). After click (read source), it trigger =
js to open new window which inside include textbox
perhaps like this? if i click on the Address the next window will show..
to alex.. that's always be my line.. =
asking what=20
source code..
actualy.. that's fine
to sam.. in return try =
this
<!--start copy=20
--> <!DOCTYPE HTML PUBLIC =
"-//W3C//DTD HTML=20
3.2=20
Final//EN"> <HTML> <HEAD> <TITLE>data</T=
ITLE> </HEAD> =20
<BODY> <H1> <font color =
=3D"red">
You can =
change the=20
information in any cell and submit it to mysql to update the original=20
database. Basically when the user views his/her information he/she =
should=20
have the option to change the=20
information.</font> </H1> <form> <TAB=
LE =20
BORDER=3D1 CELLSPACING=3D0 CELLPADDING=3D0 WIDTH=3D"100%"> <TR=20
ALIGN=3D"CENTER"> <TH>NAME</TH> <TH&g=
t;JOB=20
TITLE</TH> <TH>=20
COLOR</TH> <TH>ADDRESS</TH> <TH>=
;PHONE=20
NO</TH> </TR> <TR ALIGN=3D"CENTER" =
HEIGHT=3D"80"=20
> <TD> data form mysql :<br><b>SAM=20
<br> <input name=3D"updateName" type=3D"submit" =
id=3D"updateName" value=3D"update this cell"> =20
<br> <font color =3D"red">You can change the =
information and submit it to mysql to update the original =
database.</font>=20
</TD> <TD> data form mysql =
:<br><b>ENGENEER=20
</TD> <TD> data form mysql :<br><b>RED=20
</TD> <TD> data form mysql =
:<br><b>OKLAHOMA=20
</TD> <TD> data form mysql =
:<br><b>405-12452=20
</TD> </TR> <TR ALIGN=3D"CENTER" =
HEIGHT=3D"80"=20
> <TD> data form mysql :<br><b>JOHN=20
</TD> <TD> data form mysql =
:<br><b>DESIGNER=20
<br><input name=3D"updateJob" type=3D"submit" id=3D"updateJob" =
value=3D"update=20
this cell"><br><font color =3D"red">You can change the =
information=20
and submit it to mysql to update the original database.</font>=20
</TD> <TD> data form mysql :<br><b>BLUE =
</TD> <TD> data form mysql =
:<br><b>COLORADO=20
</TD> <TD> data form mysql =
:<br><b>303-5458=20
</TD> </TR> <TR =
ALIGN=3D"CENTER"=20
HEIGHT=3D"80" > <TD> data form mysql=20
:<br><b>MIKE</TD> <TD> data form mysql=20
:<br><b>STUDENT </TD> <TD> data form =
mysql=20
:<br><b>GREEN<br><input name=3D"updateColour" =
type=3D"submit"=20
id=3D"updateColour" value=3D"update this cell"><br><font =
color=20
=3D"red">You can change the information and submit it to mysql to =
update the=20
original database. </font> </TD> <TD> data =
form mysql=20
:<br><b>UTAH </TD> <TD> data form mysql =
:<br><b>504-5670 </TD> </TR> =
<TR ALIGN=3D"CENTER" HEIGHT=3D"80" > <TD> =
data form mysql=20
:<br><b>JULI</TD> <TD> data form mysql=20
:<br><b>TEACHER</TD> <TD> data form =
mysql=20
:<br><b>PINK<br><input type=3D"submit" =
name=3D"update"=20
value=3D"update this cell"><br><font color =3D"red">You =
can change=20
the information and submit it to mysql to update the original=20
database.</font> </TD> <TD> data form mysql=20
:<br><b>TEXES </TD> <TD> data form =
mysql=20
:<br><b>405-6364 </TD> =20
</TR> </TABLE>
=20
</form> =20
</BODY> </HTML> <!--end =
copy=20
-->
this line is same as yours but i change =
the name to=20
make everyone understand.
Yes I am sure that this can be done but we need more =
information before=20
recommending a solution. after see the output.. i found what =
he=20
intend to do..
see the attach.
Sam, what u going to do =
is.
if user see one of the data was wrong, =
he/she click=20
on the button (i should change the name into Edit). After click (read =
source),=20
it trigger js to open new window which inside include =
textbox
perhaps like this? if i click on the =
Address the=20
next window will show..
Can some one explain to me why this code (Sliding menus) works fine with HTML but it doesnt work with PHP?
echo "
";
?>
---------------------------------
Get the free Yahoo! toolbar and rest assured with the added security of spyware protection.
--0-849898525-1178950215=:57604--
Re: PHP and JavaScript
am 12.05.2007 09:04:38 von Niel Archer
Hi
> Can some one explain to me why this code (Sliding menus) works fine with =
HTML but it doesn=92t work with PHP?
Please define 'doesn't work', as it does exactly the same for me whether
PHP or HTML.
BTW hopefully a typo, but your example has no
tag only the
closing one.
I also wouldn't spread a string over several lines like that without
using "here document" syntax, as I'm not sure echo supports it.
Niel
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
In PHP when you click on the menu text Update The Record the menu doesnt open it takes you to another page. But in HTML when you click on the menu text Update The Record the menu dose open.
Niel Archer wrote:
Hi
> Can some one explain to me why this code (Sliding menus) works fine with HTML but it doesnt work with PHP?
Please define 'doesn't work', as it does exactly the same for me whether
PHP or HTML.
BTW hopefully a typo, but your example has no tag only the
closing one.
I also wouldn't spread a string over several lines like that without
using "here document" syntax, as I'm not sure echo supports it.
Niel
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
---------------------------------
Need Mail bonding?
Go to the Yahoo! Mail Q&A for great tips from Yahoo! Answers users.
--0-503967038-1178955073=:89468--
----- Original Message -----
From: "sam rumaizan"
To:
Sent: Saturday, May 12, 2007 1:10 PM
Subject: [PHP-WIN] PHP and JavaScript
> Can some one explain to me why this code (Sliding menus) works fine with
HTML but it doesn't work with PHP?
>
try this.. i just add
echo "
function toggleMenu(currMenu) {
if (document.all) {
thisMenu = eval('document.all.' + currMenu + '.style')
if (thisMenu.display == 'lock') {
thisMenu.display = 'none'
}
else {
thisMenu.display = 'block'
}
return false
}
else {
return true
}
}
// End hiding script -->
#menu1 {display:none; margin-left:20px}
Update The
Record
Update the record
[input] [input]
";
?>
---------------------------------
Give spam the boot. Take control with tough spam protection
in the all-new Yahoo! Mail Beta.
--0-1718221826-1178955792=:13706--
Re: PHP and JavaScript
am 12.05.2007 09:58:06 von Niel Archer
Hi
> In PHP when you click on the menu text Update The Record the menu doesn=
=92t open it takes you to another page. But in HTML when you click on the m=
enu text Update The Record the menu dose open.
Clicking on the "Update the Record" link does the same for me in either
PHP/HTML versions. Takes me to the linked (non-existant) page.
As I already pointed out, your example has parts missing, I can only
assume there is more missing than I can guess at from the pieces that
are present.
Niel
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: PHP and JavaScript
am 12.05.2007 10:17:26 von Niel Archer
> It works with HTML without body
Technically, both html and body tag pairs are optional, but it make your
page clearer to understand when included.
First thing I'd suggest is NOT using echo. As far as I can see you have
no dynamic content being produced, so put the whole lot before the "
tag.
If you must use echo then do it like this:
echo <<
END;
?>
Tested and works on Opera
Niel
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
---------------------------------
You snooze, you lose. Get messages ASAP with AutoCheck
in the all-new Yahoo! Mail Beta.
--0-1704429367-1178966723=:916--
Re: PHP and JavaScript
am 12.05.2007 15:12:26 von Stut
sam rumaizan wrote:
> In PHP when you click on the menu text Update The Record the menu doesnt open it takes you to another page. But in HTML when you click on the menu text Update The Record the menu dose open.
>
>
>
>
When you try the PHP version, do a "View Source" in your browser. If you
can see the PHP code then you haven't set your web server up to process
PHP files. I'm guessing this is causing the Javascript block at the top
of your script to be ignored by the browser.
If that's not the case then you need to explain exactly how you are
running the PHP version.
-Stut
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: spamfree@blueyonder.co.uk
am 12.05.2007 19:24:29 von Niel Archer
> Yes I do have dynamic content in my page.=20
> I=92m attaching the whole code for this page.
You missed the point. The fragment you supplied had no dynamic content
so does not need to be echoed at all. It can simply exist outside the
tag structure.
Niel
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I understand, but how about the attached code? Every thing works fine except the slide menu.
Sam
Niel Archer wrote:
> Yes I do have dynamic content in my page.
> Im attaching the whole code for this page.
You missed the point. The fragment you supplied had no dynamic content
so does not need to be echoed at all. It can simply exist outside the
tag structure.
Niel
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
---------------------------------
Give spam the boot. Take control with tough spam protection
in the all-new Yahoo! Mail Beta.
--0-1005367810-1179030132=:74485--
Re: spamfree@blueyonder.co.uk
am 13.05.2007 14:35:58 von Niel Archer
> I understand, but how about the attached code? Every thing works fine except the slide menu.
It had errors in it that needed correcting. Beyond that I can't much
say. It *looks* OK, but without the missing include files it can't be
tested.
I've restructured it below. I had to make some guesses about your
intent, mostly about the include files. Hopefully I've guessed
correctly and not introduced too many errors of my own.
Note that I've moved most of the HTML outside of the PHP code, as it
does not need to be parsed. I've also standardised it as much as
possible in an attempt to make it clearer.
Thank you for cleaning up my code and making it more standardized then before (excuse my ignorance Im just a beginner). Any ways still the slide menu doesnt work. It is driving me crazy. I don't see any thing wrong with my code but still the menu doesnt work
Niel Archer wrote: > I understand, but how about the attached code? Every thing works fine except the slide menu.
It had errors in it that needed correcting. Beyond that I can't much
say. It *looks* OK, but without the missing include files it can't be
tested.
I've restructured it below. I had to make some guesses about your
intent, mostly about the include files. Hopefully I've guessed
correctly and not introduced too many errors of my own.
Note that I've moved most of the HTML outside of the PHP code, as it
does not need to be parsed. I've also standardised it as much as
possible in an attempt to make it clearer.
Choose a Category:while ($line = mysql_fetch_array($result)){ foreach ($line as $value) { echo" "; }}?>
[input]
if (isset($_POST["R"])) {
$result = mysql_query("SELECT Ref_No, Job_Title,Category,Assign_Engineer,Date_Received,Date_Requir ed,Date_Assigned,ProjectedCompletionDate,Date_Completed,Manh ourSpent,Status FROM lo_data WHERE Assign_Engineer ='".$_POST["R"]."'");
}
?>
Reference No
Job Descriptions
Category
Assign Engineer
Date Received
Date Required
Date Assigned
Projected Completion Date
Date Completed
Manhour Spent
Status
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
---------------------------------
Give spam the boot. Take control with tough spam protection
in the all-new Yahoo! Mail Beta.
--0-1812852875-1179123693=:30168--
The problem with this program is: when I click on Update The Record onClick=\"return toggleMenu('menu1') cant find (read) the function toggleMenu() for some reasone.
That what I get :
Object not found! The requested URL was not found on this server. The link on the referring page seems to be wrong or outdated. Please inform the author of that page about the error.
If you think this is a server error, please contact the webmaster.
Niel Archer wrote: > I understand, but how about the attached code? Every thing works fine except the slide menu.
It had errors in it that needed correcting. Beyond that I can't much
say. It *looks* OK, but without the missing include files it can't be
tested.
I've restructured it below. I had to make some guesses about your
intent, mostly about the include files. Hopefully I've guessed
correctly and not introduced too many errors of my own.
Note that I've moved most of the HTML outside of the PHP code, as it
does not need to be parsed. I've also standardised it as much as
possible in an attempt to make it clearer.
Choose a Category:while ($line = mysql_fetch_array($result)){ foreach ($line as $value) { echo" "; }}?>
[input]
if (isset($_POST["R"])) {
$result = mysql_query("SELECT Ref_No, Job_Title,Category,Assign_Engineer,Date_Received,Date_Requir ed,Date_Assigned,ProjectedCompletionDate,Date_Completed,Manh ourSpent,Status FROM lo_data WHERE Assign_Engineer ='".$_POST["R"]."'");
}
?>
Reference No
Job Descriptions
Category
Assign Engineer
Date Received
Date Required
Date Assigned
Projected Completion Date
Date Completed
Manhour Spent
Status
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
---------------------------------
Be a PS3 game guru.
Get your game face on with the latest PS3 news and previews at Yahoo! Games.
--0-749672562-1179129208=:41415--
I have Textarea generated by while loop. How can I name it to be able to use it with my mysql update statement? Scroll down to see it
while($i<$num)
{
// collect all Information
$id=mysql_result($result,$i,"ID");
$RefNo=mysql_result($result,$i,"Ref_No");
$JobTitle=mysql_result($result,$i,"Job_Title");
$Category=mysql_result($result,$i,"Category");
$AssignEngineer=mysql_result($result,$i,"Assign_Engineer");
$DateReceived=mysql_result($result,$i,"Date_Received");
$DateRequired=mysql_result($result,$i,"Date_Required");
$DateAssigned=mysql_result($result,$i,"Date_Assigned");
$ProjectedCompletionDate=mysql_result($result,$i,"ProjectedC ompletionDate");
$DateCompleted=mysql_result($result,$i,"Date_Completed");
$ManhourSpent=mysql_result($result,$i,"ManhourSpent");
$Status=mysql_result($result,$i,"Status");
?>
echo "$id" ?>
echo "$RefNo" ?>
COLS="40"> echo "$JobTitle"?>
VALUE="Update">
echo "$Category" ?>
echo "$AssignEngineer" ?>
echo "$DateReceived" ?>
echo "$DateRequired" ?>
echo "$DateAssigned" ?>
echo "$ProjectedCompletionDate" ?>
echo "$DateCompleted" ?>
echo "$ManhourSpent" ?>
echo "$Status" ?>
++$i;
}
}
---------------------------------
Need a vacation? Get great deals to amazing places on Yahoo! Travel.
--0-1252156688-1179735843=:12770--
Re: Dynamically update mysql field
am 22.05.2007 03:33:35 von bedul
u mean like this??
//> $id=mysql_result($result,$i,"ID");
while($temp = mysql_fetch_array($result)){
foreach($temp as $varNm =>$varVal){
$$varNm =$varVal;
}
/*
put your table code here
*/
}
?>
SOry just gues!
----- Original Message -----
From: "sam rumaizan"
To:
Sent: Monday, May 21, 2007 3:24 PM
Subject: [PHP-WIN] Dynamically update mysql field
> I have Textarea generated by while loop. How can I name it to be able to
use it with my mysql update statement? Scroll down to see it
>
>
> while($i<$num)
> {
> // collect all Information
> $id=mysql_result($result,$i,"ID");
> $RefNo=mysql_result($result,$i,"Ref_No");
> $JobTitle=mysql_result($result,$i,"Job_Title");
> $Category=mysql_result($result,$i,"Category");
> $AssignEngineer=mysql_result($result,$i,"Assign_Engineer");
> $DateReceived=mysql_result($result,$i,"Date_Received");
> $DateRequired=mysql_result($result,$i,"Date_Required");
> $DateAssigned=mysql_result($result,$i,"Date_Assigned");
>
$ProjectedCompletionDate=mysql_result($result,$i,"ProjectedC ompletionDate");
> $DateCompleted=mysql_result($result,$i,"Date_Completed");
> $ManhourSpent=mysql_result($result,$i,"ManhourSpent");
> $Status=mysql_result($result,$i,"Status");
>
> ?>
>
>
>
>
>
>
>
> ++$i;
> }
> }
>
>
>
>
>
>
>
> ---------------------------------
> Need a vacation? Get great deals to amazing places on Yahoo! Travel.
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: Dynamically update mysql field
am 22.05.2007 03:33:35 von bedul
u mean like this??
//> $id=mysql_result($result,$i,"ID");
while($temp = mysql_fetch_array($result)){
foreach($temp as $varNm =>$varVal){
$$varNm =$varVal;
}
/*
put your table code here
*/
}
?>
SOry just gues!
----- Original Message -----
From: "sam rumaizan"
To:
Sent: Monday, May 21, 2007 3:24 PM
Subject: [PHP-WIN] Dynamically update mysql field
> I have Textarea generated by while loop. How can I name it to be able to
use it with my mysql update statement? Scroll down to see it
>
>
> while($i<$num)
> {
> // collect all Information
> $id=mysql_result($result,$i,"ID");
> $RefNo=mysql_result($result,$i,"Ref_No");
> $JobTitle=mysql_result($result,$i,"Job_Title");
> $Category=mysql_result($result,$i,"Category");
> $AssignEngineer=mysql_result($result,$i,"Assign_Engineer");
> $DateReceived=mysql_result($result,$i,"Date_Received");
> $DateRequired=mysql_result($result,$i,"Date_Required");
> $DateAssigned=mysql_result($result,$i,"Date_Assigned");
>
$ProjectedCompletionDate=mysql_result($result,$i,"ProjectedC ompletionDate");
> $DateCompleted=mysql_result($result,$i,"Date_Completed");
> $ManhourSpent=mysql_result($result,$i,"ManhourSpent");
> $Status=mysql_result($result,$i,"Status");
>
> ?>
>
>
>