Jump to content

angelsRock

Members
  • Posts

    49
  • Joined

  • Last visited

    Never

Posts posted by angelsRock

  1. hi.. what should i do if i want to set up a website with credit card service?  the hosting server has a module on credit card.. so.. do i need to go to bank to ask for this service to set up to my website? or the hosting server handle for us??

  2. so how should i put this

    if(!$connection)					
    	die("Connection failed");		
    
    else
    {							
    	mysql_select_db($db);							
    	$query = "delete from prem_propertyad where premPropertyID = '".$_GET[prem77]."' ";		
    
    	$exec=mysql_query($query);
    
    	echo '<script>alert("Property deleted");</script>';
    	echo '<script>window.location="myneuproperty-postings.php";</script>';
    }

  3.  

    echo"<td align=center><a href='delete.php?prem77=$row[premPropertyID]'><font size=2 color='#666666'>".Delete."</font></a></td>";

     

     

    in delete.php

    <?php
    if(isset($_GET[prem77])){
    $connection=mysql_connect($server, $user, $pass);
    if(!$connection)					
    	die("Connection failed");		
    
    else
    {							
    	mysql_select_db($db);							
    	$query = "delete from prem_propertyad where premPropertyID = '".$_GET[prem77]."' ";		
    
    	$exec=mysql_query($query);
    
    	echo '<script>alert("Property deleted");</script>';
    	echo '<script>window.location="myneuproperty-postings.php";</script>';
    }
    }?>

     

     

    how do i add in the warning to prompt " Are u sure want to delete?" with yes or no button

  4. <?php
    if(is_uploaded_file($_FILES[image1][tmp_name]))
    						{			
    								$imagename1 = basename($_FILES['image1']['name']);						
    								$newimage1 = "art/" . $imagename1;
    								$thumbimage="thumbs/" . $imagename;
    								echo $_FILES['image1']['type'];
    								if(move_uploaded_file($_FILES[image1][tmp_name],$newimage1))
    								{						
    								echo"<p class=good>FIRST PICTURE UPLOADED OK</p>";		
    								}
    								else
    								{
    								echo"<p class=error>PICTURE ERROR</p>";
    								}					
    						}
    
    
    
    
    
    
    
    	mysql_select_db($db);		
    	$query = "update premium_propertyad set address='".$_POST[address]."', area='".$_POST[area]."', state='".$_POST[state]."', type1='".$_POST[type1]."', type2='".$_POST[type2]."', type3='".$_POST[type3]."', selling_price='".$_POST[selling_price]."', rental_price='".$_POST[rental_price]."', land_area='".$_POST[land_area]."', buildup_area='".$_POST[buildup_area]."', tenure='".$_POST[tenure]."', bedroom_num='".$_POST[bedroom_num]."', bathroom_num='".$_POST[bathroom_num]."', remarks='".$_POST[remarks]."',"
    
    	if($_FILES['image1']['name']>0 || $_FILES['image2']['name']>0|| $_FILES['image3']['name']>0)
    	{
    		$query = $query & "photo1='$imagename1',photo1='$imagename1',photo1='$imagename1',"
    	}
    
    	$query= $query& " facilities='$facilities' where username='".$_SESSION[username]."' and premPropertyID='".$_POST[basic_id]."' ";			
    
    		echo $query;
    		echo mysql_error();
    		$result=mysql_query($query);?>

    if your not passing a file then why check for the file ?

     

    sorry... i don get what u meant..

    i do everything in a page..

     

    if($_FILES['image1']['name']>0 || $_FILES['image2']['name']>0|| $_FILES['image3']['name']>0)

    the above is to check whether any picture exist in the <input type=file>

     

     

    my idea is to check out of that 3 <input type=file> , if one got value.. then it will  update the

     

    $query = $query & "photo1='$imagename1',photo1='$imagename1',photo1='$imagename1',"

    thanks for hlep

     

     

     

  5. ohh.. the above page is the edit page..  the user descriptions and pictures will be shown..

     

    if user want to update the data but not the picture .. mean the

    <input type="file" size=50 name="image1"> will be left blank..

     

    if i update the blank value.. it will overwrite the previous picture..  so i put the above code like that .. but it prompt me error on the

     

    <?php
    if($_FILES['image1']['name']>0 || $_FILES['image2']['name']>0|| $_FILES['image3']['name']>0)
    	{
    		$query = $query & "photo1='$imagename1',photo1='$imagename1',photo1='$imagename1',"
    	}?>

  6. i got error on the if part in mysql query..!! :'(

     

    <?php
    if(is_uploaded_file($_FILES[image1][tmp_name]))
    						{			
    								$imagename1 = basename($_FILES['image1']['name']);						
    								$newimage1 = "art/" . $imagename1;
    								$thumbimage="thumbs/" . $imagename;
    								echo $_FILES['image1']['type'];
    								if(move_uploaded_file($_FILES[image1][tmp_name],$newimage1))
    								{						
    								echo"<p class=good>FIRST PICTURE UPLOADED OK</p>";		
    								}
    								else
    								{
    								echo"<p class=error>PICTURE ERROR</p>";
    								}					
    						}
    
    
    
    
    
    
    
    	mysql_select_db($db);		
    	$query = "update premium_propertyad set address='".$_POST[address]."', area='".$_POST[area]."', state='".$_POST[state]."', type1='".$_POST[type1]."', type2='".$_POST[type2]."', type3='".$_POST[type3]."', selling_price='".$_POST[selling_price]."', rental_price='".$_POST[rental_price]."', land_area='".$_POST[land_area]."', buildup_area='".$_POST[buildup_area]."', tenure='".$_POST[tenure]."', bedroom_num='".$_POST[bedroom_num]."', bathroom_num='".$_POST[bathroom_num]."', remarks='".$_POST[remarks]."',"
    
    	if($_FILES['image1']['name']>0 || $_FILES['image2']['name']>0|| $_FILES['image3']['name']>0)
    	{
    		$query = $query & "photo1='$imagename1',photo1='$imagename1',photo1='$imagename1',"
    	}
    
    	$query= $query& " facilities='$facilities' where username='".$_SESSION[username]."' and premPropertyID='".$_POST[basic_id]."' ";			
    
    		echo $query;
    		echo mysql_error();
    		$result=mysql_query($query);?>

     

    i want to update the page.. if the picture are not change.. so it will just update the record .. where the previous picture willl be remained...

  7. why onlly one color appear?

     

    while ($Row = mysql_fetch_array ($Result)) 
    				{ 		
    
    					If ($color = "#FFFFDF")
    						$color = "#DBFCFC";
    					else	
    						$color = "#FFFFDF";
    
    
    					$Row[selling_price]= number_format($Row[selling_price],2);				
    					print ("<TR ALIGN=center bgcolor=$color VALIGN=top>\n"); 
    					echo"<td align=center><a href='post-premiumreview.php?id=$Row[premPropertyID]'><font color='#3300CC'>".$Row[premPropertyID]."</font></a></td>";	
    
    					print ("<TD ALIGN=center VALIGN=top>".$Row['type1']." </TD>\n"); 
    					print ("<TD ALIGN=center VALIGN=top>".$Row['state']." </TD>\n"); 
    					print ("<TD ALIGN=center VALIGN=top>".$Row['selling_price']."</TD>\n"); 
    					print ("<TD ALIGN=center VALIGN=top>".$Row['type3']."</TD>\n"); 
    					print ("<TD ALIGN=center VALIGN=top>".$Row['buildup_area']."</TD>\n"); 
    					print ("<TD ALIGN=center VALIGN=top>".$Row['datePosted']."</TD>\n"); 
    					print ("</TR>\n"); 						
    				} 				

  8. ohh .. haha.. din complete..

     

    if i were to use this

    echo"<td align=center><a href='post-freereview.php?id=$row2[basic_propertyID]'>
    <font color='#3300CC'>".$row2[basic_propertyID]."</font></a></td>";	

     

    how do i get the value passed in 'post-freereview.php'?

     

    in asp i used id= request.querystring("id")

     

    in php?? thanks

  9. <?php
    $connection=mysql_connect($server, $user, $pass);
    if(!$connection)					
    	die("Connection failed");		
    
    else
    {							
    	mysql_select_db($db);							
    	echo $_POST[propertyID];
    
    	if (isset($_POST[propertyID]))
    	{
    	$query="select * from basic_propertyad where basic_propertyID='".$_POST[propertyID]."' and username='".$_SESSION[username]."';";
    	$exec=mysql_query($query);		
    	$num=mysql_affected_rows();
    	$row=mysql_fetch_array($exec,MYSQL_BOTH)
    	}
    
    	else
    	{
    		 $row[address] = $_POST[address];
    
    	}
    
    
    ?>
    
    
    
    <tr>
                <td width="19%" align="center" height="22">
                <font face="Arial" size="2"><b>Address</b> </font>
                <font face="Arial" size="1">(Optional)</font></td>
                <td width="75%" height="22">
                  <textarea rows="3" name="address" cols="37"><?php echo"$row[address]";?></textarea></td>
              </tr>

     

     

    error is on Parse error: syntax error, unexpected '}' in ... at the mysql_fetch_array

     

    when i click on this page.. data will be pulling from database...  so when i edit it and press update and if got mistake.. the data i update should maintain for the verification..

     

     

     

  10. while($row2=mysql_fetch_array($exec2,MYSQL_BOTH))

    {

    echo'<tr>';

     

     

    echo"<td width=100 align=center>substr($row2[datePosted],0,10) </td>";

     

    }

     

    why the display result for the date is    substr(2007-10-13 23:51:48,0,10) instead of 2007-10-13 ??

     

  11. <?php if ( strlen($row[username])>1 )  ?>
                
    		<input type="text" name="name" size="31" value=<?php   echo $row[name];?>> 
    
    		<?php else ?>
    		<input type="text" name="name" size="31" value=<?php if (isset($_POST[name])) echo $_POST[name];?>>
    

     

    the error is on

    Parse error: syntax error, unexpected T_ELSE in ...

    why?

  12. great discussion above..haha

     

    anyway problem.. hahahaha

     

    echo $row[selling_price];

    $row[selling_price]= number_format($row[selling_price],',',3);

     

    echo $row[selling_price];

     

    the above echo show value

    but the later echo no...

     

    error

    Warning: Wrong parameter count for number_format()

     

×
×
  • 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.