- PHP Freaks
- → Viewing Profile: Recent Posts: phpfreak
phpfreak
Member Since 03 Aug 2002Offline Last Active Feb 04 2013 06:17 PM
Community Stats
- Group Administrators
- Active Posts 479
- Profile Views 1,622
- Member Title Advanced Member
- Age 36 years old
- Birthday September 22, 1976
-
Gender
Male
-
Location
Everywhere!
Posts I've Made
In Topic: About The New Forums
24 September 2012 - 07:32 PM
I like the new look, not too crazy about the WYSYWIG editor though. I need a bigger "INSERT CODE" button. or disable button... or disable it permanently for myself. Either way, this is a million times better than SMF. I always regretted going to SMF. I think we used IPB before that if I'm not mistaken. They have improved it greatly and I'm stoked about the changes.
In Topic: Mysql_Fetch_Array Argument Not Valid
24 September 2012 - 01:18 PM
I think the problem is you're overwriting $conn within the while loop:
#execute the query
$conn = @mysql_query($sql2 )
or die(mysql_error());
if ($conn) {
echo"<br />Classes Copied";
}
Instead, maybe try:
#execute the query
$conn2 = @mysql_query($sql2 )
or die(mysql_error());
if ($conn2) {
echo"<br />Classes Copied";
}
#execute the query
$conn = @mysql_query($sql2 )
or die(mysql_error());
if ($conn) {
echo"<br />Classes Copied";
}
Instead, maybe try:
#execute the query
$conn2 = @mysql_query($sql2 )
or die(mysql_error());
if ($conn2) {
echo"<br />Classes Copied";
}
In Topic: About The New Forums
22 September 2012 - 06:39 PM
Hehe it's a glitch in the matrix
In Topic: Delete All Html In Comments
21 September 2012 - 08:13 PM
Your call to htmlspecialchars() isn't necessary and shouldn't be there without being used. Check the PHP Manual..
<?php
('includes/db_connect.php');
$result = mysql_query("SELECT * FROM comments ORDER BY id DESC LIMIT 10");
htmlspecialchars () // <--- Why is this even here? It's not being called right, not ending with a ; .
while($row = mysql_fetch_array($result))
{
echo "<div class='comment'><b><center>".$row['username'] . "</b></center><br><br><center><i>" . $row['comment']."</i></center><>";
echo "<br/>";
}
?>
In Topic: Ignore empty fields in PHP form mailer
21 September 2012 - 08:07 PM
The simple way would be use empty or a string comparison.
You can also use some comparison operators to compare other values like integers, exact matches, and etc.
if(!empty($_POST['foo'])) {
// do something
}
// or
if(strlen($_POST['foo']) > 0) {
// do something
}
You can also use some comparison operators to compare other values like integers, exact matches, and etc.
- PHP Freaks
- → Viewing Profile: Recent Posts: phpfreak
- Privacy Policy
- Forum Rules & Terms of Service ·




Find content
