
cr55dan
Members-
Posts
13 -
Joined
-
Last visited
Never
Profile Information
-
Gender
Not Telling
cr55dan's Achievements

Newbie (1/5)
0
Reputation
-
try removing $Comments = stripslashes($Comments); to test. Where is the form posting the information to this file?
-
Thats all i need to know. Thank You.
-
Are they being removed using eregi_replace Try removing the following lines $Name = ereg_replace("[^A-Za-z0-9 ]", "", $Name);$Email = ereg_replace("[^A-Za-z0-9 \@\.\-\/\']", "", $Email);$Comments = htmlspecialchars($Comments); $Comments = nl2br($Comments);$Website = ereg_replace("http://", "", $Website);$Website = ereg_replace("[^A-Za-z0-9 \@\.\-\/\'\~\:]", "", $Website); Then try it, just to see if its one of them....
-
Tried searching, but came up null. Can anyone tell me if its possible in php to show photos sent to an email address. For example, i have a page called photos.php and to get the photo's on that page people email photos@mydomain.co.uk. Can i get a page that automatically processes the photo's to the album, or atleast queues them for admin approval?? If anyone could tell me what this process is called i will then look into it.. Thanks
-
Just for reference, i made a few adjustments as advised, and used the $_GET function in the page to get my desired result, the way i used $get before did not work, thanks guys for your help!!! <?php include('../scripts/header.php'); include('../scripts/ses.php'); echo "<body>"; $cat = $_GET['cat']; // Show categories if (empty($cat)) { $query = " select * from mgb_cat "; $result = mysql_query($query); echo "<p align=\"center\"> <img src=\"../logos/forum.gif\" alt=\"forums\" /><br/><b>Categories</b><br/><br/>"; while($row = mysql_fetch_array($result)) { echo "<a href=\"forums.php?ses=$ses&cat=".$row["id"]."\">".$row["name"]."</a><br/>"; } } elseif (isset($cat)) { $query = " select * from mgb_forums where cat='$cat'"; $result = mysql_query($query); echo "<p align=\"center\"> <img src=\"../logos/forum.gif\" alt=\"forums\" /><br/><b>Forums</b><br/><br/>"; while($row = mysql_fetch_array($result)) { echo "<a href=\"topics.php?ses=$ses&forum=".$row["id"]."\">".$row["name"]."</a><br/>"; } } echo "<br/>"; if (isset($cat)) echo "<a href=\"forums.php?ses=$ses\" title=\"Menu\">Category Menu</a><br/>"; echo "<hr><a href=\"../mainmenu.php?ses=$ses\" title=\"Menu\">Main Menu</a></hr></p></body></html>"; ?>
-
sorry, i personally can't help with that, i'm still new to php and mysql. Have you tried the input type = 'password' though??
-
Input type = "password" i think i used in mine, and when i'm typing it hides the character...
-
ok, think i know why its not working, on row: echo "<a href=\"forums.php?ses=$ses&cat=".$row["id"]."\" title=\"".$row["name"]."\">".$row["name"]."</a><br/>"; $cat is not defined, and forums.php is actually the same file, so it does 2 different functions based on if $cat is empty or not. Can anyone see which method would be best to get it from the url above? i used .$row['id']. which seems to show the forum categories correctly, however when the link is clicked, it just loads the forum categories again, because it cant find $cat! Please Help!!
-
$cat is not defined using any $get[cat] which i'm assuming is the problem?
-
Tried that, still only shows what i have in the database. Would it all all help if i gave the sql setup of my database? CREATE TABLE `mgb_cat` ( `id` int(10) NOT NULL auto_increment, `order` varchar(10) NOT NULL default '', `name` varchar(100) NOT NULL default '', PRIMARY KEY (`id`) ) TYPE=MyISAM AUTO_INCREMENT=7 ; # # Dumping data for table `mgb_cat` # INSERT INTO `mgb_cat` (`id`, `order`, `name`) VALUES (1, '1', 'General'), (2, '2', 'Discussion'), (3, '3', 'Music'), (4, '4', 'Technology'), (5, '5', 'Sport'), (6, '6', 'This Site'); And CREATE TABLE `mgb_forums` ( `id` int(10) NOT NULL auto_increment, `cat` varchar(10) NOT NULL default '', `name` varchar(100) NOT NULL default '', PRIMARY KEY (`id`) ) TYPE=MyISAM AUTO_INCREMENT=29 ; # # Dumping data for table `mgb_forums` # INSERT INTO `mgb_forums` (`id`, `cat`, `name`) VALUES (1, '1', 'Everyday'), (2, '1', 'Newbies'), (3, '1', 'International'), (4, '1', 'Fight (no fists)'), (5, '2', 'Discussion'), (6, '2', 'World'), (7, '2', 'Ideas'), (8, '2', 'Rubbish'), (9, '3', 'Bands'), (10, '3', 'Punk'), (11, '3', 'Rock'), (12, '3', 'Metal'), (13, '3', 'Gigs'), (14, '3', 'Other'), (15, '3', 'Musicians'), (16, '4', 'Phones'), (17, '4', 'Games'), (18, '4', 'Computers'), (19, '4', 'Wap&Web'), (20, '5', 'Football'), (21, '5', 'Wrestling'), (22, '5', 'Extreme Sports'), (23, '5', 'Other Sports'), (24, '6', 'Testing Space'), (25, '6', 'Feedback'), (26, '6', 'Suggestions'), (27, '6', 'Help&Support'), (28, '6', 'Problems'); Are the forum tables i am using.
-
ok, i changed that and it still does the same, it just keeps returning the first query result, which is show the forums... As if the if (empty($cat)) $cat = ""; is always empty??
-
Hi, i'm farely new to php and mysql, to the stage where i don't really have a clue and have a problem with some php&mysql that i've put together. Can someone tell me why the following code only ever returns back to itself, as in the end result only ever shows forum categories from my database? include('../scripts/header.php'); include('../scripts/ses.php'); if (empty($cat)) $cat = ""; // Shows the forum categories if ($cat == "") { $query = " select * from mgb_cat "; $result = mysql_query($query); $row = mysql_fetch_array($result); echo "<card title=\"Categories\"><p align=\"center\"> <img src=\"../logos/forum.gif\" alt=\"forums\" /><br/><b>Categories</b><br/><br/>"; while($row) { echo "<a href=\"forums.php?ses=$ses&cat=".$row["id"]."\" title=\"".$row["name"]."\">".$row["name"]."</a><br/>"; $row = mysql_fetch_array($result); } } // Shows the forums if ($cat != "") { $query = " select * from mgb_forums where cat='$cat'"; $result = mysql_query($query); $row = mysql_fetch_array($result); echo "<card title=\"Forums\"><p align=\"center\"> <img src=\"../logos/forum.gif\" alt=\"forums\" /><br/><b>Forums</b><br/><br/>"; while($row) { echo "<a href=\"topics.php?ses=$ses&forum=".$row["id"]."\" title=\"".$row["name"]."\">".$row["name"]."</a><br/>"; $row = mysql_fetch_array($result); } } echo "<br/>"; if ( $cat != "" ) echo "<a href=\"forums.php?ses=$ses\" title=\"Menu\">Category Menu</a><br/>"; Any advice would be great