Jump to content

bmarker

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Everything posted by bmarker

  1. Is there a pre-built module that will allow for a rating application such as http://www.jobvent.com/ ? I'm interested in creating almost the exact same site, but not necessary for jobs. I think I remember seeing that one or several modules have this built in. Any ideas are greatly appreciated.
  2. Thanks hitman, it seemed to work.  Any reason as to why my code didn't?  I'm still learning PHP(obviously), but I would have though it SHOULD have worked.  Hopefully you can enlighten me, so I know for other possible issues in the future. Thanks Again!
  3. I have a super-simple CMS I'm making where someone can either delete a photo and description or change the description. The description on the first parse works fine, however after I sumbit my form, it repopulates the data, and gives me only the first letter in the original string...??? However the correct string is passed and updated in the dbase. Can someone tell my why? [img]http://www.3dubs.net/images/example.jpg[/img] [code] ? include("include/session.php"); if(isset($_POST['submit'])){ $propID = $_GET['propID']; $imageID = $_POST['imageID']; $image_desc = $_POST['image_desc']; mysql_connect(DB_SERVER,DB_USER,DB_PASS); mysql_select_db(DB_NAME) or die( "Unable to select database"); $update = "update images set image_desc = '$image_desc' where imageID = '$imageID' and  prop_ID = '$propID'"; $update_result = mysql_query($update); } $propID = $_GET['propID']; mysql_connect(DB_SERVER,DB_USER,DB_PASS); mysql_select_db(DB_NAME) or die( "Unable to select database"); $query = "SELECT * FROM images, propdata WHERE images.prop_ID =$propID AND propdata.prop_ID =$propID"; $result = mysql_query($query); $num = mysql_num_rows($result); mysql_close(); define('PROP_PICS_PATH', '../property_pics'); ?> <table width="770" border="1" cellspacing="0" cellpadding="5">   <tr>     <td> <? if($num > 0){ $street = mysql_result($result,0,"street"); $city_state_zip = mysql_result($result,0,"city_state_zip"); $MLS_num = mysql_result($result,0,"MLS_num"); }else{ echo("There are no pictures uploaded for this property.<br>"); echo("anything?".$propID); echo('<a href = "javascript:history.back()">Back to Properties</a>'); } ?> <table> <tr> <td> <? echo($street);?><br> <? echo($city_state_zip);?><br> <? echo("MLS Number: ".$MLS_num);?> </td> </tr> </table> <? for($i=0;$i<$num;$i++){ $image_name[$i] = mysql_result($result,$i,"image_name"); $image_desc[$i] = mysql_result($result,$i,"image_desc"); $imageID[$i] = mysql_result($result,$i,"imageID"); echo('<form name="form1" method="post" action="'.$_SERVER['PHP_SELF'].'?propID='.$propID.'">'); echo('<input type = "hidden" name="imageID" value ="'.$imageID[$i].'">'); echo('<input type = "hidden" name="prop_ID" value ="'.$propID.'">'); echo("<table width = '100%' border='1' cellpadding='5' bgcolor='#F5F5F5'>\n <tr>\n"); echo("<td width=\"1\">\n"); echo('<img src = "'.PROP_PICS_PATH.'/'.$image_name[$i].'"/><br>'."\n"); echo("</td>\n"); echo("<td>\n"); echo('Image Description: <input type="text" name="image_desc" value ="'.$image_desc[$i].'">'."<br>\n"); echo('Remove image from database'); echo('<input type="checkbox" name="deletePic" value="1">'); echo("</td>\n"); echo("</tr>"); echo('<tr><td colspan = "3" align = "right">'); echo('<input type="submit" name ="submit" id="submit" value="Update">'); echo('</td></tr>'); echo("</table></form>\n"); } ?> <table> <tr> <td> <? if($num>0){ echo('<a href = "javascript:history.back()">Back to Properties</a>'); } ?> </td> </tr> </table> </td>   </tr> </table> [/code]
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.