hi,
what am trying to achieve is hide all cells/<td> with view, edit or delete actions (that will be 3 columns) so that on preview of this table these cells will not be visisble.Am trying to give these cells (view, edit, delete) ids so that on click of a button i can hide or display them. Here's the code, thanks:
[PHP]for ($i = $startrec; $i < $reccount; $i++)
{
$row = mysql_fetch_ass oc($res);...
User Profile
Collapse
-
Using GetElementById in PHP loop
hi,
I will like to use javascript GetElementById in a PHP for loop whereby the ids are generated as the loop executes and not fixed ids as in the example below. Therefore function displayRow() once executed will collapse all cells with ids variably assigned on looping. thus i will have $i or a variable id instead of captionRow, captionRow2 etc.
...Code:function displayRow(){ var col = document.getElementById("captionRow"); -
ronnil,
believe $graph is instantiated since only that particular line (4) gives error.
if i comment out that particular line the program runs to the end ok.
code below, gotten from a tutorial pn using JPgraph
[PHP]$graph = new Graph(250,150," auto");
$graph->SetScale("text int");
$graph->img->SetMargin(50,3 0,50,50);
$graph->AdjBackgroundI mage(0.4,0.7,-1); ...Leave a comment:
-
pbmods
I offered the suggestion on "GET' cos wat i thought from 1st post he wanted to update by passing a url visibly which i assume cant be done using 'POST'.
i guess link is not meant as HREF link
correction? thnks....Leave a comment:
-
hi pbmods,
i get from your var_dump:
bool(false) string(4) "NULL"
looking forward to you nailing this problem for me....Leave a comment:
-
purple,
as far as i can tell spelling correct,
still searching for solution....Leave a comment:
-
alternate color of table row based on MySQL order by query
hi,
have a table generated based on a mysql query:
[PHP]sql=("SELECT a.month, b.location, c.complaint, d.source, e.number, f.stat_id, AND g.id_year = e.y_id ......AND '$_POST[y_id]' = e.y_id
ORDER BY month,location,complaint,source") or die (mysql_error()) ;[/PHP]
table generate from above query is:
[PHP]while ($stat_rec= mysql_fetch_arr ay($CustomerSta t))....echo "<td>".$stat_re c['complaint']."[/PHP]... -
GD library for WAMP 1.6.6
hi,
am haing problem creating a JPgraph with my php.
PHP version: 5.2.0
WAMP version: 1.6.6
error message in browser:
php code:
[PHP]$graph->AdjBackgroundI mage(0.4,0.7,-1); //setting BG type[/PHP]
hoping someone will give me a conclusion here.... -
hi,
you are using 'POST' for your form method instead of 'GET'. 'GET' will send through url for update on processing to your dynamically generated form.
Advise: Always usefor your php opening tags.Code:<?php
Leave a comment:
-
alter table row color determined by mysql order by query
hi,
have a mysql query that orders entry by complaint category.
this query is then used with mysql_fetch_arr ay to generate table of records ordered by complaint and other parameters.
i can alter color for every even and odd row but how can i alter row color based on each specific 'ORDER BY' mysql query?
so how can i change color for every unique order of
[CODE=php]$stat_rec['complaint'].[/CODE]
... -
code green,
thanks. works well.
nothing is simple where knowledege is lackingLeave a comment:
-
pbmos,
mysqldump is working, selected database csu and creates tables in 'csu' database but no data dumped into restored tables. tables have no records thoughdump file have records in them.
used phpmyadmin and worked fine though this is not my desired approach...Leave a comment:
-
mysql dump problem - not dumping
hi!
my problems:
1. i can not restore my database
from my command line i type
gives me:when i check 'csu' database no tables created.Code:/*!40101 SET @OLD_CHARACTER... /*!40104 .... dump complete 2007-08-27...
original backup created using mysqldump
working from command line and WAMP server
thks in advance.... -
works fine. added quotes.
thus usedinstead.Code:'$encrypted_password'
thnks....Leave a comment:
-
Problem using md5 to insert encrypted password into table
hi!
Am having a problem inserting password after encrypting into a column of a table. am using MySQL.
$[PHP]loginid = $_POST['loginid'];
$password = $_POST['password'];
$encrypt_passwo rd = md5($password);
if ($_POST['submit']) {
mysql_select_db ("CSU", $con);
$sql="INSERT INTO login2 (loginid, password, privilege) VALUES ('$_POST[loginid]', $encrypt_passwo rd,... -
thanks alot,
was just about to post a reply that have gotten round this problem wen i noticed u had already replied. what i did in the end is this (more simple logic then the former):
[PHP]$sum= ("SELECT complaint, SUM(number) FROM complaint, stat
WHERE '$_POST[m_id]' = m_id AND '$_POST[l_id]' = l_id AND '$_POST[y_id]' = y_id AND
id_complaint = c_id
GROUP BY c_id") or die (mysql_error()) ;
...Leave a comment:
-
thnks for the lead, below is what i developed:
[PHP]$sum= ("SELECT a.complaint, SUM(b.number) Number FROM complaint a, stat b
WHERE '$_POST[m_id]' = m_id AND '$_POST[l_id]' = l_id AND '$_POST[y_id]' = y_id AND
a.id_complaint = b.c_id
GROUP BY c_id") or die (mysql_error()) ;
$sum_1 = mysql_query($su m) or die (mysql_error()) ;
echo "<table border = '1'>"; echo "<th>Compla int</th><th>Number</th>";...Leave a comment:
-
Echo record from referenced table
hi;
i have two tables in MySQL with:
1. TABLE(stat) column(c_id, FOREIGN KEY) referencing
2. TABLE (complaint) column (id_complaint, PRIMARY KEY).
TABLE (complaint) also contain a second column (complaint_type ).
How can i get PHP to echo second column (complaint type) in TABLE (complaint) when it is referencing the PRIMARY KEY of this table instead(id_comp laint). as regards the below... -
-
onclick event for table row record to form field
hi all, struggling with javascript, need help please!
i have a table being generated from a MySQL DB and wish to enable onclick on table row so that table data on that row can be transferred to a form for update or delete. the table row contains the primary key ($comp_rec['id']) which will be used to reference data ($comp_rec['complaint']) in DB for update or delete. my codes...Leave a comment:
No activity results to display
Show More
Leave a comment: