Jump to content

vinpkl

Members
  • Posts

    448
  • Joined

  • Last visited

Posts posted by vinpkl

  1. OK sorry that has just confused me!

     

    Is that all of the code on your page?

     

    If not can you post all of the code so i can see where the below part fits in.

     

    $status="Hide";
    
    if(isset($_REQUEST['status']))
    {
    $pid=$_REQUEST['status'];
    echo $pid;
    $qry="select * from product_table where product_id=$pid";
    $result=mysql_query($qry);
    $row=mysql_fetch_array($result);
    if($row['status']=='Y')
    {
    $updtqry="update product_table set status='N' where product_id=$pid";
    mysql_query($updtqry,$conn) or die("Not updated");
    }
    else
    {
    $updtqry="update product_table set status='Y' where product_id=$pid";
    mysql_query($updtqry,$conn) or die("Not updated");
    }
    
                 if($row['status']=='Y') {
                     $status = "Hide";
                 } else {
                     $status = "Show";
                 }
    
    }	
    

     

    hi

     

    this is the code that is inserted before the <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"  starts

    $status="Hide";
    
    if(isset($_REQUEST['status']))
    {
    $pid=$_REQUEST['status'];
    echo $pid;
    $qry="select * from product_table where product_id=$pid";
    $result=mysql_query($qry);
    $row=mysql_fetch_array($result);
    if($row['status']=='Y')
    {
    $updtqry="update product_table set status='N' where product_id=$pid";
    mysql_query($updtqry,$conn) or die("Not updated");
    }
    else
    {
    $updtqry="update product_table set status='Y' where product_id=$pid";
    mysql_query($updtqry,$conn) or die("Not updated");
    }
    
                 if($row['status']=='Y') {
                     $status = "Hide";
                 } else {
                     $status = "Show";
                 }
    
    
    }	
    
    

     

    and the other code is in my <table> tag

    <table width="901" cellpadding="6" cellspacing="0" class="bordr">
          <tr style="background-color:#CCCCCC; height:25px">
            <td>Product ID </td>
            <td>Product Name </td>
            <td>Description </td>
    	<td>Cutout Price</td>
    	<td>Price</td>
    	<td>Product Image</td>
    	<td>Shipping cost</td>
    	<td>Shipping detail</td>
    	<td>warranty</td>
                              <td>Show/hide</td>
    	<td>Action</td>
          </tr>
    <?php
    
    if(isset($_REQUEST['dealer_id']))
    {
    $dealer_id=$_REQUEST['dealer_id'];
    $qry="select * from product_table where dealer_id=$dealer_id";
    //echo $qry;
    $result = mysql_query($qry);
    
    if(mysql_num_rows($result)>0)
    {
    	while($row=mysql_fetch_array($result))
    	{
    		echo "<tr>";
    		echo "<td valign=top>". $row['product_id'] . "</td>";
    		echo "<td valign=top>". $row['product_name'] . "</td>";
    		echo "<td valign=top>". $row['description'] . "</td>";
    		echo "<td valign=top>". $row['cutout_price'] . "</td>";
    		echo "<td valign=top>". $row['price'] . "</td>";
    		echo "<td valign=top>". "<img border=1 height=115 width=92 src='uploads/" . $row['image'] . "'/>" . "</td>";
    		echo "<td valign=top>". $row['shipping_cost'] . "</td>";
    		echo "<td valign=top>". $row['shipping_detail'] . "</td>";
    		echo "<td valign=top>". $row['warranty'] . "</td>";
    
    
    		echo '<form name="status_update" action="manage_products.php" method="post">';
    		echo '<td valign="top"><input type="submit" value="'.$status.'" />';
    		echo '<input type="hidden" name="status" value="'.$row['product_id'].'" />';
    		echo '</td>';
    		echo '</form>';
    
    		echo "<td valign=top>"."<a href='modify_products.php?id=" . $row['product_id'] . "'/>  Modify </a>" . "</td>";
    		echo "</tr>";	
    	}
    }
    }	
    
    

  2. so thats not the problem then - which brings me back to the below:

     

     

    does this page receive $_REQUEST['status'] when it first loads?

     

    or only once the user clicks the hide/show button?

     

     

    i think that you will find that the problem is that when the page loads it does not get a product from the database and therefore when you click the hide button the database is trying to update the row with product_id="" and as this doesn't exist the value of status will never equal 'Y' and the button will always say "hide"

     

     

     

    HI

     

    To make myself more clear.

    I have a dropdown of dealer list on my page from where i select the dealer and This is all i receive on selecting the dealer and not clicking the hide/show button.

    product image, product id, description, price etc everything is coming from database and showed on the page.

     

    
    if(isset($_REQUEST['dealer_id']))
    {
    $dealer_id=$_REQUEST['dealer_id'];
    $qry="select * from product_table where dealer_id=$dealer_id";
    //echo $qry;
    $result = mysql_query($qry);
    
    if(mysql_num_rows($result)>0)
    {
    	while($row=mysql_fetch_array($result))
    	{
    		echo "<tr>";
    		echo "<td valign=top>". $row['product_id'] . "</td>";
    		echo "<td valign=top>". $row['product_name'] . "</td>";
    		echo "<td valign=top>". $row['description'] . "</td>";
    		echo "<td valign=top>". $row['cutout_price'] . "</td>";
    		echo "<td valign=top>". $row['price'] . "</td>";
    		echo "<td valign=top>". "<img border=1 height=115 width=92 src='uploads/" . $row['image'] . "'/>" . "</td>";
    		echo "<td valign=top>". $row['shipping_cost'] . "</td>";
    		echo "<td valign=top>". $row['shipping_detail'] . "</td>";
    		echo "<td valign=top>". $row['warranty'] . "</td>";
    
    
    		echo '<form name="status_update" action="manage_products.php" method="post">';
    		echo '<td valign="top"><input type="submit" value="'.$status.'" />';
    		echo '<input type="hidden" name="status" value="'.$row['product_id'].'" />';
    		echo '</td>';
    		echo '</form>';
    
    
    		echo "<td valign=top>"."<a href='modify_products.php?id=" . $row['product_id'] . "'/>  Modify </a>" . "</td>";
    		echo "</tr>";	
    	}
    }
    }	
    
    

  3. change this:

     

    if($row['status']=='Y') {

                     $status = "Hide";

                 } else {

                     $status = "Show";

                 }

     

     

    to this:

     

    if($row['status']=='Y') {

                     $status = "Show";

                 } else {

                     $status = "Hide";

                 }

     

    and see if that helps

     

    hi

     

    which this change if i have to hide the product then i will have to press the hide button 2 times.

    It will change the Enum status to "N" and hide on second time.

     

    But still it doesnt change button status value to "show".

     

    vineet

  4. Yeah, sorry i meant the second part:

     

    and also are you only displaying the submit button when there is a product?

     

    cause what you have at the moment is wont work because the form is outside of the IF statement - ie there will be no product id in the status field

     

    does this page receive $_REQUEST['status'] when it first loads?

     

    or only once the user clicks the hide/show button?

     

    Hi

     

    i tell you everything in detail what is happening.

     

    In the database i have status field with enum datatype value "Y" and "N" and default set to "Y".

     

    So when the page in which "this submit button" is inserted will display button value as "Hide".

     

    When i click the "Hide button" then on top of the page it echos "7" that is the product_id.

     

    but it doesnt change to "show".

     

    vineet

  5. read my edit above

     

    hi

     

    this is what i have added that u said

     

    $status="Hide";
    
    if(isset($_REQUEST['status']))
    {
    $pid=$_REQUEST['status'];
    echo $pid;
    $qry="select * from product_table where product_id=$pid";
    $result=mysql_query($qry);
    $row=mysql_fetch_array($result);
    if($row['status']=='Y')
    {
    $updtqry="update product_table set status='N' where product_id=$pid";
    mysql_query($updtqry,$conn) or die("Not updated");
    }
    else
    {
    $updtqry="update product_table set status='Y' where product_id=$pid";
    mysql_query($updtqry,$conn) or die("Not updated");
    }
    
                 if($row['status']=='Y') {
                     $status = "Hide";
                 } else {
                     $status = "Show";
                 }
    
    }	
    
    echo '<form name="status_update" action="manage_products.php" method="post">';
    		echo '<td valign="top"><input type="submit" value="'.$status.'" />';
    		echo '<input type="hidden" name="status" value="'.$row['product_id'].'" />';
    		echo '</td>';
    		echo '</form>';
    

     

     

     

  6. ahh yes sorry, my fault forgot to initialise the variable:

     

    try this:

     

    $status="Hide";
    
    if(isset($_REQUEST['status']))
    {
    
    

     

    hi

     

    Now its showing everytime "Hide". Its not toggling with "Hide" and "Show".

    Its functioning properly means on first click its hiding the product and on second click its showing the product.

    But its not changing its status from "hide" to "show". everytime its showing on it "Hide".

     

    vineet

  7. try using a hidden field to hold the value of the product and set a variable to display the value for the submit button, like this:

     

    
    if(isset($_REQUEST['status']))
    {
    $pid=$_REQUEST['status'];
    echo $pid;
    $qry="select * from product_table where product_id=$pid";
    $result=mysql_query($qry);
    $row=mysql_fetch_array($result);
    if($row['status']=='Y')
    {
    $updtqry="update product_table set status='N' where product_id=$pid";
    mysql_query($updtqry,$conn) or die("Not updated");
    }
    else
    {
    $updtqry="update product_table set status='Y' where product_id=$pid";
    mysql_query($updtqry,$conn) or die("Not updated");
    }
    
                 if($row['status']=='Y') {
                     $status = "Hide";
                 } else {
                     $status = "Show";
                 }
    }	
    
    echo '<form name="status_update" action="manage_products.php" method="post">';
    echo '<td valign="top"><input type="submit" value="'.$status.'" />';
    echo '<input type="hidden" name="status" value="'.$row['product_id'].'" />;
    echo '</td>';
    echo '</form>';
    

     

    hi

     

    i tried your code but still it doesnt show the value "show" or "hide" on it. it shows blank button. neither any error is coming.

     

    vineet

  8. hi all

     

    i have a input type button name="status" which on click change the enum status of the field in database to "Y" or "N".

    If the status is "Y" the product is showed to public but if the status is "N" then the product gets hide for public.

    But the problem i m facing is that i m not able to write the value "hide" or "show" on input type button because the value i have taken is the product_id. If i change the value to "show" or hide then it doesnt work.

     

    The code i m using is

    if(isset($_REQUEST['status']))
    {
    $pid=$_REQUEST['status'];
    echo $pid;
    $qry="select * from product_table where product_id=$pid";
    $result=mysql_query($qry);
    $row=mysql_fetch_array($result);
    if($row['status']=='Y')
    {
    $updtqry="update product_table set status='N' where product_id=$pid";
    mysql_query($updtqry,$conn) or die("Not updated");
    }
    else
    {
    $updtqry="update product_table set status='Y' where product_id=$pid";
    mysql_query($updtqry,$conn) or die("Not updated");
    }
    
    }	
    
    echo "<form name='status_update' action='manage_products.php' method='post'>";
    		echo "<td valign=top>". "<input type ='submit' name='status'". "value=" . $row['product_id'];?> <?php if($row['status']=='Y') echo 'checked';?> <?php echo "</td>";
    		echo "</form>";
    

     

    I want to know how can i do exactly the same with two image as buttons.

    one image button name=hide and other image button name=show.

    When hide image button is click then the product will hide and when the show image button is click the product will

    show.

     

    I tried this but this doesnt worked. please help

    echo "<td valign=top>";
    		if ($row['status']==Y) 
    		{ 	
    		echo "<a href='manage_products.php?=" . $row['product_id'] . "'>" . "<img src='../images/hide_icon.gif' name='status' id='status'>" . "</a>";
    		 } 
    
    		 else 
    		 {
    		echo "<a href='manage_products.php?status" . $row['product_id'] . "&" .$row['status']=Y. "'>" . "<img src='../images/show_icon.gif' name='status' id=status'>" . "</a>";
    		 }	
    
    		echo "</td>";
    
    

  9. hi all

     

    i have a table name product_table in my database. i want to add a field name "status" in "product_table" after "warranty" field with ENUM values ("Y,"N").

    I m getting the following error when writing in qry in sql field or adding the field by choosing values and datatype manually.

     

    SQL query: 
    
    ALTER TABLE product_table ADD COLUMN status TYPE ENUM( "Y", "N" ) AFTER warranty 
    
    MySQL said:  
    
    #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TYPE ENUM ("Y", "N") AFTER warranty' at line 1 
    
    

     

    vineet

  10. try

    <?php
    $count = 0;
    $qry1="select * from product_table";
    $result1 = mysql_query($qry1);
    if(mysql_num_rows($result1)>0)
    {
    echo "<table border=1>";
    while($row1=mysql_fetch_array($result1))
    {
    	if ($count++  == 0) echo '<tr>';
    
    	echo "<td width=148>";
    
    	echo "<table border=1 bgcolor=#ffddee>";
    	echo "<tr>";
    	echo "<td width=125>" . "<img width=116 height=117 src='admin/uploads/" . $row1['image'] . "'/>" . "</td>";
    	echo "</tr>";
    	echo "<tr>";
    	echo "<td valign=top  width=125>". $row1['product_name'] . "</td>";
    	echo "</tr>";
    	echo "<tr>";
    	echo "<td valign=top>". $row1['description'] . "</td>";
    	echo "</tr>";
    	echo "<tr>";
    	echo "<td valign=top class=cut>". $row1['cutout_price'] . "</td>";
    	echo "</tr>";
    	echo "<tr>";
    	echo "<td valign=top>". $row1['price'] . "</td>";
    	echo "</tr>";
    	echo "</table>";
    	echo "</td>";
    	if ($count == 4){
    		$count = 0;
    		echo '</tr>';
    	}
    }
    if ($count > 0) while ($count++ < 4) echo '<td>&nbsp:</td>';
    echo "</tr>";
    echo "</table>";
    }
    
    ?>

     

    hi sasa

     

    thanks for the reply. its works great.

     

    i would like to ask that if i am right then $count is for product. And this wil display 4 products in each row till the end of number of products in database.

     

    can we apply condition that only 3 rows should be displayed mean only 12 products on page (3rows x 4products). Means 3 rows containing of 4 products each. i dont want to show all the products.

     

    vineet

  11. try this...

     

    <?php
    echo "<table border=1>";
          echo "<tr>";
    $qry1="select * from product_table";  
    $result1 = mysql_query($qry1);          
       if(mysql_num_rows($result1)>0)
       {
       while($row1=mysql_fetch_array($result1))
       {
      
                echo "<td width=148>";
          
          echo "<table border=1 bgcolor=#ffddee>";
          echo "<tr>";
          echo "<td width=125>" . "<img width=116 height=117 src='admin/uploads/" . $row1['image'] . "'/>" . "</td>";
          echo "</tr>";
          echo "<tr>";
          echo "<td valign=top  width=125>". $row1['product_name'] . "</td>";
          echo "</tr>";
          echo "<tr>";
          echo "<td valign=top>". $row1['description'] . "</td>";
          echo "</tr>";
          echo "<tr>";
          echo "<td valign=top class=cut>". $row1['cutout_price'] . "</td>";
          echo "</tr>";
          echo "<tr>";
          echo "<td valign=top>". $row1['price'] . "</td>";
          echo "</tr>";
          echo "</table>";
    echo "</td>";
       }
      
       }
          echo "</tr>";
    echo "</table>"; 
    ?>
    

     

    hi rajuvs

     

    thanks a lot. it worked great. it worked like i wanted.

     

    one thing more i would like to ask that i 20 products in the database from where these products are coming. But i want to display only 4 in my page not all 20.

    what condition will apply

     

    vineet

     

    hi ranjuvs

     

    This code displays four products in a row as i needed.

    if i need that after these four products, the next four products should showup in 2nd row and then next four products in 3rd row.

    what do we need to change in this code

     

    vineet

  12. try this...

     

    <?php
    echo "<table border=1>";
          echo "<tr>";
    $qry1="select * from product_table";  
    $result1 = mysql_query($qry1);          
       if(mysql_num_rows($result1)>0)
       {
       while($row1=mysql_fetch_array($result1))
       {
      
                echo "<td width=148>";
          
          echo "<table border=1 bgcolor=#ffddee>";
          echo "<tr>";
          echo "<td width=125>" . "<img width=116 height=117 src='admin/uploads/" . $row1['image'] . "'/>" . "</td>";
          echo "</tr>";
          echo "<tr>";
          echo "<td valign=top  width=125>". $row1['product_name'] . "</td>";
          echo "</tr>";
          echo "<tr>";
          echo "<td valign=top>". $row1['description'] . "</td>";
          echo "</tr>";
          echo "<tr>";
          echo "<td valign=top class=cut>". $row1['cutout_price'] . "</td>";
          echo "</tr>";
          echo "<tr>";
          echo "<td valign=top>". $row1['price'] . "</td>";
          echo "</tr>";
          echo "</table>";
    echo "</td>";
       }
      
       }
          echo "</tr>";
    echo "</table>"; 
    ?>
    

     

    hi rajuvs

     

    thanks a lot. it worked great. it worked like i wanted.

     

    one thing more i would like to ask that i 20 products in the database from where these products are coming. But i want to display only 4 in my page not all 20.

    what condition will apply

     

    vineet

  13. is this what you are trying

     

    $qry1="select * from product_table";   
    $result1 = mysql_query($qry1);           
       if(mysql_num_rows($result1)>0)
       {
       while($row1=mysql_fetch_array($result1))
       {
       
          echo "<table border=1 bgcolor=#ffddee>";
          echo "<tr>";
          echo "<td width=148>Image</td><td width=148>prod_name</td<td width=148>description</td><td width=148>cut outprice</td><td width=148>price</td>";
          echo "</tr>";
          echo "<tr>";
          echo "<td width=125>" . "<img width=116 height=117 src='admin/uploads/" . $row1['image'] . "'/>" . "</td>";
          echo "<td valign=top  width=125>". $row1['product_name'] . "</td>";
          echo "<td valign=top>". $row1['description'] . "</td>";
          echo "<td valign=top class=cut>". $row1['cutout_price'] . "</td>";
          echo "<td valign=top>". $row1['price'] . "</td>";
          echo "</tr>";
          echo "</table>";
       }
       
       }
    

     

    hi rajuvs

     

    thanks for reply. actually what u did is splitted my content into four rows but different columns. but i need these four rows content to come horizontally not vertically. means like 1|2|3|4.

     

    let me make my question more clear again :

     

    1) i need four columns in a table means 4 <td>.

    2) i have a table which contains 5 rows in which first row contains product image, second row contains product name, third row contains product description, forth row contains product cutout price and fifth row contains product price.

    3) now i need all this content of this table with 5 rows to be inserted in my 4 columns with separate products.

     

    means the 2no. table that contains content will be inserted in all 4 columns with different image, description, price etc.

     

    i think i may be clear with my question now.

     

    vineet

  14. hi all

    i m using this script to fetch and display products in my page.

    the "for loop" creates four columns. and the other part fetches and display the products.

    but my problem is that i m not able to insert the products in 4 columns created by "for loop". when i change ($i=result1) then the script doesnt work.

     

    <?php
    for($i=1;$i<=1;$i++)
    {
    //echo "<tr>";
    echo "<td width=148>" .$i."</td>";
    echo "<td width=148>" .$i."</td>";	
    echo "<td width=148>" .$i."</td>";
    echo "<td width=148>" .$i."</td>";
    //echo "</tr>";			
    
    $qry1="select * from product_table";	
    $result1 = mysql_query($qry1);			  
    if(mysql_num_rows($result1)>0)
    {
    while($row1=mysql_fetch_array($result1))
    {
    
    	echo "<table border=1 bgcolor=#ffddee>";
    	echo "<tr>";
    	echo "<td width=125>" . "<img width=116 height=117 src='admin/uploads/" . $row1['image'] . "'/>" . "</td>";
    	echo "</tr>";
    	echo "<tr>";
    	echo "<td valign=top  width=125>". $row1['product_name'] . "</td>";
    	echo "</tr>";
    	echo "<tr>";
    	echo "<td valign=top>". $row1['description'] . "</td>";
    	echo "</tr>";
    	echo "<tr>";
    	echo "<td valign=top class=cut>". $row1['cutout_price'] . "</td>";
    	echo "</tr>";
    	echo "<tr>";
    	echo "<td valign=top>". $row1['price'] . "</td>";
    	echo "</tr>";
    	echo "</table>";
    }
    
    }
    
    }
    
    

  15. <style type="text/css">

    .left { float:left; }

    .right { float:right; }

    </style>

     

    <div class="left">image1</div> <div class="right">image2</div>

     

    ?

     

    hi

     

    where should i insert your code in my code. i m not calling image1 and image2 manually. these are called by loop in php code.  where can i write <div class="left"> and <div class="right">.

     

    in my code :

    echo "<td valign=top>". "<img height=200 width=253 src='admin/uploads/" . $row['offer_image'] . "'/>" . "</td>";

    is calling both the images from same table column name "offer_image" from the mysql database.

     

    please elaborate i m new to it

     

    vineet

  16. hi all

     

    i want to display two offer ads images in my php page. i am able to fetch data from mysql in my page. But the trouble is the script below displays the data in rows like one ad image above and second ad image below.

    i want to display one ad in left and second ad in its right. how is it possible.

     

    vineet

     

    <?php

    $qry="select * from special_offers order by offer_id";

    $result = mysql_query($qry);

    if(mysql_num_rows($result)>0)

    {

    while($row=mysql_fetch_array($result))

    {

    echo "<tr>";

    echo "<td valign=top>". "<img height=200 width=253 src='admin/uploads/" . $row['offer_image'] . "'/>" . "</td>";

    echo "<td>". "<img src='images/spacer.gif' width=15 height=2 />" . "</td>";

    echo "</tr>";

    }

    }

     

    ?>

  17. you need to add

    ,$headers);

    to the end of your mail() call

     

    Scott.

     

    hi scott i tried

    --------------------------------------------

    $headers = "From: $from";

    $message = "confirmation Email this info has been sent to {$to}\n{$message}";

    mail($Visitor_Email1,"confirmation Email",$to,$message,$headers);

    -------------------------------------------------

     

    $message = "confirmation Email this info has been sent to {$to}\n{$message}";

    mail($Visitor_Email1,"confirmation Email",$to,$message,$headers);

     

    ------------------------------------------------------------

     

    the from body contains the same "nobody"

     

    vineet

  18. just add some headers to it

    $headers = "From: $from";
    mail($Visitor_Email1,"confirmation Email",$to,$message,$headers);

     

    Scott.

     

    hi scott

     

    i used this in two ways

    --------------------------------

    $message = "confirmation Email this info has been sent to {$to}\n{$message}";

    $headers = "From: $from";

    mail($Visitor_Email1,"confirmation Email",$to,$message);

     

    ------------------------------------

    $message = "confirmation Email this info has been sent to {$to}\n{$message}";

    mail($Visitor_Email1,"confirmation Email",$to,$message);

    $headers = "From: $from";

    mail($Visitor_Email1,"confirmation Email",$to,$message);

    -----------------------

     

    in first way i receive mail with the same from body contains "nobody" and by using second way i dont receive any email.

     

    vineet

  19. can you just add this to the bottom

    $message = "confirmation Email this info has been sent to {$to}\n{$message}";
    mail($Visitor_Email1,"confirmation Email",$to,$message);

     

    Scott.

     

    hi scott

     

    your this code also worked fine. but there is one issue. and that is the "From" body contains "Nobody". i mean where we read that this email is from this person. there its written "Nobody".

     

    I want to replace "Nobody" with clients "email address". When the visitor receives the confirmation email in his email account he should read that this email is from that website where he filled the form.

     

    vineet

  20. i think you need this

    $Visitor_Name1=$_POST['name1'];   
    $Visitor_Email1=$_POST['email1'];     
    $Visitor_Mobile1=$_POST['mobile1'];
    $Visitor_Enquiry1=$_POST['enquiry1']; 

     

    Scott.

     

    hi scott

     

    thanks. you were right. i got it working with your code.

     

    one thing more i would like to ask that how can the visitor to the site who fills email address in the form receive a confirmation email in his email address that we have received his information on submitting form.

     

    i mean when the visitor submits the form he should receive an confirmation email in his email adress.

     

    vineet

     

     

  21. hi everyone

     

    just joined,

     

    i using php script to send email. i m receiving the labels only not the content filled in the form. means i m receiving the heading "name = " but not receiving "my name written" when i fill the name in the input field for the name in the form.

     

    just this i m receiving

    Full Name : 

    Email ID : 

    Mobile : 

    enquiry :

     

    vineet

     

     

    this is my php script used to send mail

    <?php 

     

    $Visitor_Name1;      //Name Of Visitor. 

    $Visitor_Email1;      //Visitors Email address.

    $Visitor_Mobile1;    //mobile Of Visitor. 

    $Visitor_Enquiry1;  //information

     

    //Assignment of form values in variables. 

     

    $Visitor_Name1=$name1; 

    $Visitor_Email1=$email1;   

    $Visitor_Mobile1=$mobile1;

    $Visitor_Enquiry1=$enquiry1;

     

    $message .= "Full Name :  $Visitor_Name1\n"; 

    $message .= "Email ID :  $email1\n";

    $message .= "Mobile :  $mobile1\n";   

    $message .= "enquiry : $Visitor_Enquiry1";

    $from ="info@user.com"; 

    $to = "me@yahoo.com";

    $subject = "GADGETS ENQUIRY FORM"; 

    $headers = "From: $from"; 

     

    mail($to,$subject,$message,$headers); 

    $URL="thanks.html";

    header ("Location: $URL");

     

    ?>   

    -------------------------

    this is my html form

    <form action="enquiry.php" class="content"  name="form1" method="post"><table width="350" border="0" cellspacing="0" cellpadding="8">

                      <tr>

                        <td colspan="2">You can also fill our enquiry form :</td>

                        </tr>

                      <tr>

                        <td width="147">Name : </td>

                        <td width="353"><input name="name1" type="text" id="name1" tyle="width:250px" /></td>

                      </tr>

                      <tr>

                        <td>Email : </td>

                        <td><input name="email1" type="text" id="email1" style="width:250px" /></td>

                      </tr>

                      <tr>

                        <td>Mobile : </td>

                        <td><input name="mobile" type="text" id="mobile" style="width:250px" /></td>

                      </tr>

                      <tr>

                        <td valign="top">Enquiry : </td>

                        <td><textarea name="enquiry" rows="4" id="enquiry" tyle="width:250px"></textarea></td>

                      </tr>

                      <tr>

                        <td> </td>

                        <td><input type="submit" name="Submit" value="Submit" class="submt" /></td>

                      </tr>

                    </table></form>

     

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