1

(0 replies, posted in Programming)

I need to allow (or not) a post. I can´t figure out how to get the value of the checkbox through an array, and UPDATE the DB with it.

Thanks in advance.


<form action="<?php echo ($PHP_SELF); ?>" method="post" class="font">
    <table width="90%" border="1" align="center">
      <tr>
<?php 

require '../config.php';
$dbs = $dbs['estariabueno'];

$dbh=mysql_connect ("$db_host", "$db_username", "$db_password") or die ('I cannot connect to the database because: ' . mysql_error());
mysql_select_db ("$db_name"); 
$query="SELECT * FROM $dbs ORDER BY id";

$result = mysql_query($query);
$num = mysql_numrows($result);

$query = "INSERT INTO $dbs VALUES ($id,'$titulo','$texto','$fuente','$fecha')";
mysql_query($query);

$result = mysql_query("SELECT * FROM $dbs");
$num_rows = mysql_num_rows($result);

mysql_close();

?>

<tr>
<td><b>NAME</b></td>
<td><b>TEXT</b></td>
<td><b>DATE</b></td>
<td><b>IP</b></td>
<td><b>ALLOW</b></td>
<td><b>EDIT / DEL</b></td></tr>
<?
$i = 0;
while ($i < $num) {

$id=mysql_result($result,$i,"id");
$text=mysql_result($result,$i,"text");
$name=mysql_result($result,$i,"name");

$allow = array(
"IDAllow" => $id, 
"Valor" => mysql_result($result,$i,"allow")
);

$fecha=mysql_result($result,$i,"fecha");
$ip=mysql_result($result,$i,"ip");

?>

<td><strong><? echo $name; ?></strong></td>
<td><div align="justify"><? echo $text; ?></div><br></td>
<td><div align="center"><? echo $fecha; ?></div><br></td>
<td><div align="center"><? echo $ip; ?></div><br></td>

<?php
if ($allow[Valor] == "yes") 
{
$printChecked = "checked='checked'";
} else {
$printChecked = "";
}
?>

<td><input type="checkbox" name="reg[]" value="reg[<?php echo $id; ?>]" <? echo $printChecked; ?>/></td>

<?php
echo "<td><a href='editar.php?cmd=edit&id=$id'>Editar</a><br><a href='eliminar.php?cmd=delete&id=$id'>Eliminar</a></td></tr>";
$i++;
}
?>

</tr></table>
</td>
  </tr>
</table>
<input name="submit" type="submit" value="submit" />
</form>
<?
if ($_POST["$submit"])
{

// ?????????????????????

}
?>

2

(9 replies, posted in Programming)

For "hiding" complete URL in address bar you should use this code in the index

<html>
<head>
<title>Title</title>
</head>
<frameset frameborder="0" framespacing="0" border="0" rows="100%,0%">
<frame name="IndexFrame" src="index2.php" noresize>
   <noframes>
       <body>
       </body>
   </noframes>

</html>

3

(37 replies, posted in News)

Nice work!

Software used?

I'm afraid not...

GD Support  enabled 
GD Version  bundled (2.0.28 compatible) 
FreeType Support  enabled 
FreeType Linkage  with freetype 
GIF Read Support  enabled 
GIF Create Support  enabled 
JPG Support  enabled 
PNG Support  enabled 
WBMP Support  enabled 
XBM Support  enabled 

Thank you!

I did so some time ago... But suddenly I get this error message when trying to upload a new photo...

With FileZilla.
Which is the text of the .htaccess?

I still don't know why when installing the mod it creates random folders on my host...

Thanks!

lie2815 wrote:

I got almost the same error message. I fixed it, though.
Still, does anybody know how to do chmod-stuff with www.godaddy.com ?
Thanks a lot.

How did you fix this? Thxs

According to the PHP info safe mode is off... I shoulda did something wrong. Thanks!!

I got this error msg:

File: /home/manantia/public_html/forouca/install_mod.php
Line: 117

PunBB reported: Unable to copy .htaccess file to new subfolder with name '/home/manantia/public_html/forouca/download/6f4d13fc09596f71599757a90925b533'

Permissions are set to 777 on the download folder.

I got 3 folders call some like this "4bde70ca99a3bb157b3cfaab38f81f41" and I can't delete them from the server.
Thank you Frank!

It seems a great MOD. I've done every step in the README file, as usual, but something isnt working fine... When I upload a file no errors are shown, the server folder is empty (although is in 777) and there's no linking to the file in the message... plis I need some help! Thanks in advance

I got the same error as yelowpunk ("ERROR : The server could not record the downloaded file. Contact the administrator email@address.com") when trying to upload a regular .jpg. Permissions on my server are alright, as usual... Could it be an upgrade of PHP version?

Thanks in advance