From the following HTML i need to extract email address only to save it in database. I need to pull it in array, what i was planning is to use jquery/ajax to pull all email using dom and save it to another page using ajax ,but the problem is that
<td> have no unique identification with other <td> i.e i can do it if td has class or id name
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<table width="100%" border="1">
<tr></tr>
<tr>
<td>NAME</td>
<td>ADDRESS</td>
<td>PHONE</td>
<td>EMAIL</td>
</tr>
<tr>
<td>wwqw</td>
<td>qww</td>
<td>ew</td>
<td>email#exmaple.com</td>
</tr>
<tr>
<td>e</td>
<td>wew</td>
<td>ew</td>
<td>emai1l#exmaple.com</td>
</tr>
<tr>
<td>e</td>
<td>ewe</td>
<td>we</td>
<td>email2#exmaple.com</td>
</tr>
<tr>
<td>we</td>
<td>we</td>
<td>we</td>
<td>emai3l#exmaple.com</td>
</tr>
<tr>
<td>ww</td>
<td>w</td>
<td>w</td>
<td>emai4l#exmaple.com</td>
</tr>
</table>
</body>
</html>
I need to grab email address and store in array like below
Array
(
[0] => email#exmaple.com
[1] => emai1l#exmaple.com
[2] => email2#exmaple.com
[3] => emai3l#exmaple.com
[4] => emai4l#exmaple.com
)
<td> can have variable class and id , so its very hard to use jquery etc to pull them. I am obstructed by it . Any help wil be appreciated
Using jQuery-->
$(document).ready(function() {
$('tr').find('td:last').each(function(){
var t = $(this).text();
if(typeof(t) === 'string' && t.indexOf('#') >-1) alert(t);
})
});
do not use jquery, regular expression will make your job easy.
$string='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<table width="100%" border="1">
<tr></tr>
<tr>
<td>NAME</td>
<td>ADDRESS</td>
<td>PHONE</td>
<td>EMAIL</td>
</tr>
<tr>
<td>wwqw</td>
<td>qww</td>
<td>ew</td>
<td>email#exmaple.com</td>
</tr>
<tr>
<td>e</td>
<td>wew</td>
<td>ew</td>
<td>emai1l#exmaple.com</td>
</tr>
<tr>
<td>e</td>
<td>ewe</td>
<td>we</td>
<td>email2#exmaple.com</td>
</tr>
<tr>
<td>we</td>
<td>we</td>
<td>we</td>
<td>emai3l#exmaple.com</td>
</tr>
<tr>
<td>ww</td>
<td>w</td>
<td>w</td>
<td>emai4l#exmaple.com</td>
</tr>
</table>
</body>
</html>';
echo "<pre>";
$pattern="/([\s]*)([_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*([ ]+|)#([ ]+|)([a-zA-Z0-9-]+\.)+([a-zA-Z]{2,}))([\s]*)/i";
preg_match_all($pattern, $string, $matches);
print_r($matches[0]);
<?php
include('simple_html_dom.php');
$html = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<table width="100%" border="1">
<tr></tr>
<tr>
<td>NAME</td>
<td>ADDRESS</td>
<td>PHONE</td>
<td>EMAIL</td>
</tr>
<tr>
<td>wwqw</td>
<td>qww</td>
<td>ew</td>
<td>email#exmaple.com</td>
</tr>
<tr>
<td>e</td>
<td>wew</td>
<td>ew</td>
<td>emai1l#exmaple.com</td>
</tr>
<tr>
<td>e</td>
<td>ewe</td>
<td>we</td>
<td>email2#exmaple.com</td>
</tr>
<tr>
<td>we</td>
<td>we</td>
<td>we</td>
<td>emai3l#exmaple.com</td>
</tr>
<tr>
<td>ww</td>
<td>w</td>
<td>w</td>
<td>emai4l#exmaple.com</td>
</tr>
</table>
</body>
</html>';
$dom = new simple_html_dom();
$dom->load($html);
$table = $dom->find('table', 0);
if($table){
foreach($table->find('tr') as $row) {
$rowData = array();
foreach($row->find('td') as $cell) {
$rowData[] = $cell->innertext;
}
$theData[] = $rowData;
}
print_r($theData);
}
?>
Or you can do it with jquery
$(document).ready(function() {
$('tr').find('td:last').each(function(){
console.log($(this).text());
})
});
Related
I have the following code for generating HTML content to PDF using DomPDF.and my problem focuses on this line
$pdf_content='<!DOCTYPE html PUBLIC "-//W3C//DTD...
The entire code
<?php
error_reporting(0);
require_once ('dompdf_config.inc.php');
$pdf_content='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<style type="text/css">
#pdf_header, #pdf_container{ border: 1px solid #CCCCCC; padding:10px; }
#pdf_header{ margin:10px auto 0px; border-bottom:none; }
table{ width:580px; }
#pdf_container{margin:0px auto; }
.rpt_title{ background:#99CCFF; }
</style>
<body>
<div id="pdf_header" >
<table border="0" cellspacing="1" cellpadding="2">
<tr id="hdRow">
<td width="20%"><img src="space_age_header.jpg" style="width:250px" ></td>
<td width="30%" align="center">Sample File</td>
<td width="30%" align="left">Marimuthu<br>User Code : 179865420</td>
</tr>
</table>
</div>
<div id="pdf_container" >
<table border="0" cellspacing="1" cellpadding="2">
<tr align="center" bgcolor="pink" style="color:#FFF"><td colspan="3"><b>Your Statement Summery</b></td> </tr>
<tr bgcolor="#006" style="color:#FFF"><td colspan="3" align="left">Your Heading.</td></tr>
</table>
<table> <tr> <td> Name </td><td> Department</td><td>Total </td><td>Grade </td> </tr>
<tr> <td> Marimuthu </td><td> Admin</td><td>250 </td><td>A </td> </tr>
</div></body></html>'
;
$name = date("Ymd").rand().'.pdf';
$reportPDF=createPDF(12, $pdf_content, 'activity_Report', $name );
function createPDF($pdf_userid, $pdf_content, $pdf_For, $filename){
$path='UsersActivityReports/';
/*$rndNumber=rand();
$filename=$pdf_userid.date("Ymd").$rndNumber.'.pdf';*/
$dompdf=new DOMPDF();
$dompdf->load_html($pdf_content);
$dompdf->render();
$output = $dompdf->output();
file_put_contents($path.$filename, $output);
return $filename;
}
echo '<a href="UsersActivityReports/'.$name.'" > Download </a>';
?>
I have extracted the $pdf_content='<!DOCTYPE html PUBLIC "-//W3C//DTD... part to another page page.php and modified it to allow generating files from database using a do while loop.
<?php
include("../../Connections/dbConfig.php");
$query_record = mysqli_query($link,"SELECT * FROM `subjects`") or
die (mysqli_error($link));
$row_record = mysqli_fetch_assoc($query_record);
$totalRows_record = mysqli_num_rows($query_record);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<style type="text/css">
#pdf_header, #pdf_container{ border: 1px solid #CCCCCC; padding:10px; }
#pdf_header{ margin:10px auto 0px; border-bottom:none; }
table{ width:580px; }
#pdf_container{margin:0px auto; }
.rpt_title{ background:#99CCFF; }
</style>
<body>
<div id="pdf_header" >
<table border="0" cellspacing="1" cellpadding="2">
<tr id="hdRow">
<td width="20%"><img src="space_age_header.jpg" style="width:250px" ></td>
<td width="30%" align="center">Sample File</td>
<td width="30%" align="left">Marimuthu<br>User Code : 179865420</td>
</tr>
</table>
</div>
<div id="pdf_container" >
<table border="0" cellspacing="1" cellpadding="2">
<tr align="center" bgcolor="pink" style="color:#FFF"><td colspan="3"><b>Your Statement Summery</b></td> </tr>
<tr bgcolor="#006" style="color:#FFF"><td colspan="3" align="left">Your Heading.</td></tr>
</table>
<table>
<tr> <td> Subject </td><td> Code </td><td>Total </td><td>Grade </td> </tr>
<?php do { ?>
<tr> <td> <?php echo $row_record['subject']; ?> </td><td> <?php echo $row_record['code']; ?> </td><td>250 </td><td>A </td> </tr>
<?php } while ($row_record = mysqli_fetch_assoc($query_record)); ?>
</table>
</div></body></html>
Now this is where i am stuck. How do i implement this. How do i return the dynamically generated code back to the
$pdf_content='
and make it work.
$pdf_content= include('page.pp'); //something like this doesn't seem to work
I welcome any alternative idea on the same
The main thing to note about your code changes is that the HTML is now outside of a code block. This means that PHP will send that code to the browser as it's processed. To get around this you would need to enable output buffering to capture the rendered text.
ob_start();
include('page.php');
$pdf_content = ob_get_clean();
ob_end_clean();
Note that some systems may limit the size of the output buffer (see the output_buffering setting). You can check that using ini_get('output_buffering');. If a limit is enabled make sure the size of your rendered HTML is less than the maximum size of the buffer.
when ever i am putting all the style in the style tag it is working fine but if i put those codes in an external stylesheet it is not showing any style in frontend.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php $title; ?></title>
<link href="css/style.css" rel="stylesheet" type="text/css" />
</head>
<table border="1" cellpadding="2" cellspacing="2">
<tr>
<th>post ID</th>
<th>post title</th>
<th>post Description</th>
<th>Author</th>
<th>Date</th>
</tr>
<?php
foreach($posts as $post)
{
echo "
<tr>
<td>".$post->Post_id."</td>
<td>".$post->post_title."</td>
<td>".$post->Post_description."</td>
<td>".$post->author."</td>
<td>".$post->date."</td>
</tr>
" ;
}
?>
</table>
<body>
</body>
</html>
and my external stylesheet is
/* CSS Document */
table{
width:1000px;
text-align:center;
margin:auto;
}
th{
background:#0CC;
animation-direction:normal;
height:50px;
}
td{
height:50px;
background:#396;
color:#FFF;
}
i donot understand what is wrong.
Your HTML <table> should be placed between the <body></body>.
Ummm, why is the table tag in the head part? There you should place only meta data, script data and all like, as far as I know / meta tags, script tags, title tag, link to bootstrap for example /. You should place your table tag in the body part and everything should be fine. Remember, the part in the head is NOT visible on you web page, only the things you put in the body. Hope that fixes your problem. :)
Try this:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php $title; ?></title>
<link href="../css/style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table border="1" cellpadding="2" cellspacing="2">
<tr>
<th>post ID</th>
<th>post title</th>
<th>post Description</th>
<th>Author</th>
<th>Date</th>
</tr>
<?php
foreach($posts as $post)
{
echo "
<tr>
<td>".$post->Post_id."</td>
<td>".$post->post_title."</td>
<td>".$post->Post_description."</td>
<td>".$post->author."</td>
<td>".$post->date."</td>
</tr>
" ;
}
?>
</table>
</body>
</html>
I want to display this
http://www.bwbsv.de/bbsb/service/extern/standings.php?start=http://www.bwbsv.de/bbsb/service/extern/start.htm&end=http://www.bwbsv.de/bbsb/service/extern/end.htm&t=401
(this is just an example)
on a page of my wordpress site.
The start.htm contains
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="de" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Demonstration Tabellen-Integration</title>
<link rel="stylesheet" type="text/css"
href="http://www.bwbsv.de/bbsb/service/extern/demo.css" />
</head>
<body>
while the end.htm looks like
</body>
</html>
The "t=401" specifies what league to display.
What would be the best way to implement this into a page?
EDIT: I forgot somehing. The url of the start.htm and end.htm are stored localy while the standings.php isn't. the point of this is to have an up to date league table, whithout doing it manually.
EDIT 2: To clarify further:
The first link is just an example of how it should look like. It can be customized to fit the users needs with for example t=401 means the league with id=401. After customization it should look something like this
http://www.bwbsv.de/bbsb/service/extern/standings.php?start=http:/yourServer.com/start.htm&end=http://http:/yourServer.com/end.htm&t=123
This link provides an up to date league table of the league with id 123. The updates are not done by me, they are provided from the bwbsv page. I want to integrate this table into an normal page/widget/sidebar/... on my wordpress site.
As I mentioned in my first post, due to the Same origin policy you cant load external content, sorry.
Use jQuery load()
Give the table an id of league-table and then:
$('#league-table').load('path/to/your_file');
Here is a working example:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="de" xmlns="http://www.w3.org/1999/xhtml">
<head>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<title>Demonstration Tabellen-Integration</title>
<link rel="stylesheet" type="text/css"
href="http://www.bwbsv.de/bbsb/service/extern/demo.css" />
</head>
<body>
<script type="text/javascript">
console.log("here");
$(document).ready(function(){
console.log("here");
$('#league').load('path_to_your_file.html');
alert("finished loading");
});
</script>
<div id="league">
</div>
</body>
</html>
File.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="de" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Demonstration Tabellen-Integration</title>
<link rel="stylesheet" type="text/css"
href="http://www.bwbsv.de/bbsb/service/extern/demo.css" />
</head>
<body>
<table id="league" class="standings">
<tbody><tr>
<th class="hpl">Pl.</th>
<th class="hteam">Team</th>
<th class="hg">G</th>
<th class="hv">V</th>
<th class="hpct">.pct</th>
<th class="hgb">GB</th>
</tr>
<tr>
<td class="pl">1.</td>
<td class="team">
Kehl Mosquitos
</td>
<td class="g">0</td>
<td class="v">0</td>
<td class="pct">.000</td>
<td class="gb">0</td>
</tr>
<tr>
<td class="pl">2.</td>
<td class="team">
Ulm Falcons
</td>
<td class="g">0</td>
<td class="v">0</td>
<td class="pct">.000</td>
<td class="gb">0</td>
</tr>
<tr>
<td class="pl">3.</td>
<td class="team">
Sindelfingen Squirrels
</td>
<td class="g">0</td>
<td class="v">0</td>
<td class="pct">.000</td>
<td class="gb">0</td>
</tr>
<tr>
<td class="pl">4.</td>
<td class="team">
Heidelberg Hedgehogs
</td>
<td class="g">0</td>
<td class="v">0</td>
<td class="pct">.000</td>
<td class="gb">0</td>
</tr>
<tr>
<td class="pl">5.</td>
<td class="team">
Schriesheim Raubritter
</td>
<td class="g">0</td>
<td class="v">0</td>
<td class="pct">.000</td>
<td class="gb">0</td>
</tr>
<tr>
<td class="pl">6.</td>
<td class="team">
Göppingen Green Sox
</td>
<td class="g">0</td>
<td class="v">0</td>
<td class="pct">.000</td>
<td class="gb">0</td>
</tr>
<tr>
<td class="pl">7.</td>
<td class="team">
Freiburg Knights
</td>
<td class="g">0</td>
<td class="v">0</td>
<td class="pct">.000</td>
<td class="gb">0</td>
</tr>
<tr>
<td class="pl">8.</td>
<td class="team">
Tübingen Hawks 2
</td>
<td class="g">0</td>
<td class="v">0</td>
<td class="pct">.000</td>
<td class="gb">0</td>
</tr>
<tr>
<td class="pl">9.</td>
<td class="team">
Neuenburg Atomics 2
</td>
<td class="g">0</td>
<td class="v">0</td>
<td class="pct">.000</td>
<td class="gb">0</td>
</tr>
</tbody></table>
</body>
</html>
Try with adding an iframe:
<iframe border="0" width="600px" height="auto" src="http://www.bwbsv.de/bbsb/service/extern/standings.php?start=http://www.bwbsv.de/bbsb/service/extern/start.htm&end=http://www.bwbsv.de/bbsb/service/extern/end.htm&t=401"></iframe>
You can change it's dimension for the best fit of the page.
I am trying to create a page that displays rpg ranks from a mysql database on a webpage
i went into the database and organized the data by level, so the person with the highest level is shown first and so on, however the database does not contain a table for ranks
I am trying to do that manually in dreamweaver but I don't know how, can I create a counter and have it display in the table?
I managed to get the following:
http://slayersgaming.com/rpgranks2.php
<?php
$dbh=mysql_connect("********", "**********", "*********") or die('Cannot connect to the database because: '. mysql_error());
mysql_select_db("C368969_thcrpgCSGO");
$rpgranks_sql = "SELECT * FROM `thc_rpg` ORDER BY `thc_rpg`.`level` DESC LIMIT 0, 30 ";
$rpgranks_query = mysql_query($rpgranks_sql) or die(mysql_error());
$rsrpgranks = mysql_fetch_assoc($rpgranks_query);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<p>
<table width="501" height="58" border="0">
<tr>
<td width="240"><h2><strong>Name</strong></h2></td>
<td width="70"><strong>Level</strong></td>
<td width="70"><strong>XP</strong></td>
<td width="70"><strong>Credits</strong></td>
<td width="70"><strong>Rank</strong></td>
</tr>
</table>
<?php do{ ?>
<table width="501" height="58" border="0">
<tr>
<td width="240"><?php echo $rsrpgranks['name'];?></td>
<td width="70"><?php echo $rsrpgranks['level'];?></td>
<td width="70"><?php echo $rsrpgranks['xp'];?></td>
<td width="70"><?php echo $rsrpgranks['credits'];?></td>
<td width="70"> </td>
</tr>
</table>
<?php } while ($rsrpgranks = mysql_fetch_assoc($rpgranks_query)) ?>
</p>
<p> </p>
</body>
</html>
screen cap here: http://oi47.tinypic.com/21exdfs.jpg
This is actually really easy to do. You just need a counter in your do-while loop like this:
<?php
$counter = 1;
do{
?>
<table width="501" height="58" border="0">
<tr>
<td><?php echo $counter; ?></td>
<td width="240"><?php echo $rsrpgranks['name'];?></td>
<td width="70"><?php echo $rsrpgranks['level'];?></td>
<td width="70"><?php echo $rsrpgranks['xp'];?></td>
<td width="70"><?php echo $rsrpgranks['credits'];?></td>
<td width="70"> </td>
</tr>
</table>
<?php
$counter++;
} while ($rsrpgranks = mysql_fetch_assoc($rpgranks_query))
?>
i have this code:
<?php
////////////////////////////////////////
include "../includes/site_includes.php";//
//////////////////////////////////////
$sql = getallsitesettings();
if ($result = $mysqli->prepare($sql))
{
$rekza = 1;
$result->bind_param("i",$rekza);
$result->execute();
$result->store_result();
$rowsZ = $result->num_rows;
}
if($rowsZ>0)
{
$row = fetch($result);
}
$siteTitle= $row[0]["site_title"];
$sitePeleText= $row[0]["pele"];
?>
<?php
$act = $mysqli->real_escape_string($_GET["act"]);
if($act=="edit")
{
$folderid = (int)$_GET["id"];
$sql2 = getfolderbyId();
if ($result2 = $mysqli->prepare($sql2))
{
$result2->bind_param("i",$folderid);
$result2->execute();
$result2->store_result();
$rowsZ2 = $result2->num_rows;
}
if($rowsZ2>0)
{
$row2 = fetch($result2);
}
for($j=0; $j<$rowsZ2; $j++)
{
$foldername = $row2[$j]["fold_name"];
$foldpath = $row2[$j]["fold_path"];
$foldpic = $row2[$j]["fold_pic"];
}
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html dir="rtl">
<head>
<title><?=$txt_folders?></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="Generator" content="EditPlus">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
<link href="<?=$site_url?>/css/styles.css" rel="stylesheet" type="text/css" />
</head>
<table align="center" cellspacing="0" cellpadding="0" width="1021">
<tr>
<td><?php
include "../site_header.php";
?></td>
</tr>
<tr>
<td style="background-color:#dcdbdb;">
<table align="center" cellspacing="0" cellpadding="0" width="1021">
<tr>
<td>
<div class="admintitle">
<?=$txt_main_admin?> > <?=$txt_folders?>
</div>
</td>
</tr>
<tr>
<td>
<table align="center" cellspacing="0" cellpadding="0" width="400">
<tr>
<td style="color:Black; font-family:arial; font-weight:Bold;"><?=$txt_folders_name?></td>
<td style="color:Black; font-family:arial; font-weight:normal;"><input type="textbox" name="fold_name" value="<?=$foldername?>" /></td>
</tr>
<tr>
<td style="color:Black; font-family:arial; font-weight:Bold;"><?=$txt_folder_path?></td>
<td style="color:Black; font-family:arial; font-weight:normal;"><input type="textbox" name="fold_path" value="<?=$foldpath?>" /></td>
</tr>
<tr>
<td></td>
<td></td>
</tr>
<tr>
<td colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td><?php
include "../site_footer.php";
?></td>
</tr>
</table>
<body>
</body>
</html>
...
can you tell me whats the problem ?
why when act = add
the variables in value="" in the input is undefined?....and how can i define them in the edit and in the add...
in the add i need them empty...and in the edit it works great....
May be...
if($act=="edit" || $act=="add")
:)