what is the problem in my code

<?php

if($_POST['submit'] && !empty($_FILES)){
	
	$formok=true;
	
	//inputs vars
	
	$user_name=$_POST['user_name'];
	$co_name=$_POST['co_name'];
	$co_email=$_POST['co_email'];
	$co_mobile=$_POST['co_mobile'];
	$country_code=$_POST['country_code'];
	$city=$_POST['city'];
	$Designation=$_POST['Designation'];
	$co_web=$_POST['co_web'];
	$co_Landline=$_POST['co_Landline'];
	$CompanyType=$_POST['CompanyType'];
	$no_of_employees=$_POST['no_of_employees'];
	$Address=$_POST['Address'];
	$IATA=$_POST['IATA'];
	$TAAI=$_POST['TAAI'];
	$TAFI=$_POST['TAFI'];
	$IATO=$_POST['IATO'];
	$ADTOI=$_POST['ADTOI'];
	$ASTA=$_POST['ASTA'];
	$PATA=$_POST['PATA'];
	$OTOAI=$_POST['OTOAI'];
	
	// file vars
	
	$path=$_FILES['upload']['tmp_name'];
	$name=$_FILES['upload']['name'];
	$size=$_FILES['upload']['size'];
	$type=$_FILES['upload']['type'];
	$error=$_FILES['upload']['error'];
	
	if(!is_uploaded_file($path)){
		
		$formok=false;
		echo "no file selected";
	}
	
	// check file extension 
	if(!in_array($type,array('image/png','image/x-png','image/jpeg','image/gif'))){
		
	$formok=false;
	echo "the file not image";
	
	}
	if(filesize($path) > 800000){
		
		$formok=false;
		echo "file size exceeds limit";
		}
	}
	if($formok){
		
		if($connect=mysqli_connect('localhost','ahmed_samy','12@qw12@qw','cali_db')){
			
		$content=file_get_contents($path);
		
		$user_name=mysqli_real_escape_string($_POST['user_name']);
		$co_name=mysqli_real_escape_string($_POST['co_name']);
		$co_email=mysqli_real_escape_string($_POST['co_email']);
		$co_mobile=mysqli_real_escape_string($_POST['co_mobile']);
		$country_code=$_POST['country_code'];
		$city=mysqli_real_escape_string($_POST['city']);
		$Designation=mysqli_real_escape_string($_POST['Designation']);
		$co_web=mysqli_real_escape_string($_POST['co_web']);
		$co_Landline=$_POST['co_Landline'];
		$CompanyType=$_POST['CompanyType'];
		$no_of_employees=$_POST['no_of_employees'];
		$Address=mysqli_real_escape_string($_POST['Address']);
		$IATA=$_POST['IATA'];
		$TAAI=$_POST['TAAI'];
		$TAFI=$_POST['TAFI'];
		$IATO=$_POST['IATO'];
		$ADTOI=$_POST['ADTOI'];
		$ASTA=$_POST['ASTA'];
		$PATA=$_POST['PATA'];
		$OTOAI=$_POST['OTOAI'];
		
		$sql="INSERT INTO users(user_name,co_name,co_email,co_mobile,country_code,city,Designation,co_web,co_Landline,CompanyType,no_of_employees,Address,IATA,TAAI,TAFI,IATO,ADTOI,ASTA,PATA,OTOAI) VALUES('$user_name','$co_name','$co_email','$co_mobile','$country_code','$city','$Designation','$co_web','$co_Landline','$CompanyType','$no_of_employees','$Address','$IATA','$TAAI','$TAFI','$IATO','$ADTOI','$ASTA','$PATA','$OTOAI')";

		echo "<script type='text/javascript'> alert('company saved please check your email to confirm')</script>";
							
		header("location:index.php");
							
		$to = "$co_email";
		$subject = "No-reply-Egitto";
		$txt = "visit this link to set your password http://egitto.egyptvision.net/setpassword.php";
		$headers = "From: accounts@egitto.com.eg." . "\r\n" .
			"CC: ahmed_bondok2006@yahoo.com";

		mail($to,$subject,$txt,$headers);
		
		$sqlimage="insert into images(name,size,type,content) values ('$name','$size','$type','$safeimage')";
		
		$querysql=mysqli_query($connect,$sql);
		
		$queryimage=mysqli_query($connect,$sqlimage);
		
		if($querysql && $queryimage){
			
			$imageid=mysqli_insert_id($connect);
			}
		mysqli_close($connect);
			}
			else{
				echo "<script type='text/javascript'> alert('no connection established')</script>";
				}
		echo "<script type='text/javascript'> alert('saved successfully....')</script>";
		}
?>

Open in new window



my html is

				<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" enctype="multipart/form-data">
                    <div class="row">
						<div class="col-lg-4">
                        <label>Name<span style="color:#900">*</span> :</label></div>
						<div class="col-lg-8"><input class="form-control" id="name" name="us_name" type="text"></div>
					</div>
                    <br>
					<div class="row">
						<div class="col-lg-4"><label>Company Name<span style="color:#900">*</span> :</label></div>
						<div class="col-lg-8"><input class="form-control" id="cname" name="co_name" type="text"></div>
					</div>
					<br>
					<div class="row">
						<div class="col-lg-4"><label>Email Address<span style="color:#900">*</span>:</label></div>
						<div class="col-lg-8"><input class="form-control" id="email" name="co_email" type="text"></div>
					</div>
                    <br>
					<div class="row">
						<div class="col-lg-4"><label>Mobile No<span style="color:#900">*</span> :<br><br></label></div>
						<div class="col-lg-8"><input class="form-control" id="phone" name="co_mobile" type="text"></div>
					</div>
                    <br>
					<div class="row">
						<div class="col-lg-4"><label>Country<span style="color:#900">*</span> :</label></div>
						<div class="col-lg-8">
						<select name="country_code" id="country_code" class="form-control">
                            <option value="Afghanistan">Afghanistan</option>
                            <option value="Aland Islands">Aland Islands</option>
                            <option value="Albania">Albania</option>
                            <option value="Algeria">Algeria</option>
                            <option value="American Samoa">American Samoa</option>
                            <option value="Andorra">Andorra</option>
                            <option value="AO">Angola</option>
                            <option value="AI">Anguilla</option>
                            <option value="AQ">Antarctica</option>
                            <option value="AG">Antigua and Barbuda</option>
                            <option value="AR">Argentina</option>
                            <option value="AW">Aruba</option>
                            <option value="AU">Australian</option>
                            <option value="AT">Austria</option>
                            <option value="AZ">Azerbaijan</option>
                            <option value="BS">Bahamas</option>
                            <option value="BH">Bahrain</option>
                            <option value="BD">Bangladesh</option>
                            <option value="BB">Barbados</option>
                            <option value="BY">Belarus</option>
                            <option value="BE">Belgium</option>
                            <option value="BZ">Belize</option>
                            <option value="BJ">Benin</option>
                            <option value="BM">Bermuda</option>
                            <option value="BT">Bhutan</option>
                            <option value="BO">Bolivia</option>
                            <option value="BA">Bosnia and Herzegovina</option>
                            <option value="BW">Botswana</option>
                            <option value="BV">Bouvet Island</option>
                            <option value="BR">Brazil</option>
                            <option value="IO">British Indian Ocean Territory</option>
                            <option value="BN">Brunei Darussalam</option>
                            <option value="BG">Bulgaria</option>
                            <option value="BF">Burkina Faso</option>
                            <option value="BI">Burundi</option>
                            <option value="KH">Cambodia</option>
                            <option value="CM">Cameroon</option>
                            <option value="CA">Canada</option>
                            <option value="CV">Cape Verde</option>
                            <option value="KY">Cayman Islands</option>
                            <option value="CF">Central African Republic</option>
                            <option value="TD">Chad</option>
                            <option value="CL">Chile</option>
                            <option value="CN">China</option>
                            <option value="CX">Christmas Island</option>
                            <option value="CC">Cocos (Keeling) Islands</option>
                            <option value="CO">Colombia</option>
                            <option value="KM">Comoros</option>
                            <option value="CD">Congo (Kinshasa)</option>
                            <option value="CG">Congo Republic of the Democratic</option>
                            <option value="CD">Congo-Brazzaville</option>
                            <option value="CK">Cook Islands</option>
                            <option value="CR">Costa Rica</option>
                            <option value="HR">Croatia (Hrvatska)</option>
                            <option value="CU">Cuba</option>
                            <option value="CY">Cyprus</option>
                            <option value="CZ">Czech Republic</option>
                            <option value="DK">Denmark</option>
                            <option value="DJ">Djibouti</option>
                            <option value="DM">Dominica</option>
                            <option value="DO">Dominican Republic</option>
                            <option value="TP">East Timor</option>
                            <option value="EC">Ecuador</option>
                            <option value="EG">Egypt</option>
                            <option value="SV">El Salvador</option>
                            <option value="GQ">Equatorial Guinea</option>
                            <option value="ER">Eritrea</option>
                            <option value="EE">Estonia</option>
                            <option value="ET">Ethiopia</option>
                            <option value="FK">Falkland Islands (Malvinas)</option>
                            <option value="FO">Faroe Islands</option>
                            <option value="FJ">Fiji</option>
                            <option value="FI">Finland</option>
                            <option value="FR">France</option>
                            <option value="GF">French Guiana</option>
                            <option value="PF">French Polynesia</option>
                            <option value="TF">French Southern Territories</option>
                            <option value="GA">Gabon</option>
                            <option value="GM">Gambia</option>
                            <option value="GE">Georgia</option>
                            <option value="DE">Germany</option>
                            <option value="GH">Ghana</option>
                            <option value="GI">Gibraltar</option>
                            <option value="GR">Greece</option>
                            <option value="GL">Greenland</option>
                            <option value="GD">Grenada</option>
                            <option value="GP">Guadeloupe</option>
                            <option value="GU">Guam</option>
                            <option value="GT">Guatemala</option>
                            <option value="GG">Guernsey</option>
                            <option value="GN">Guinea</option>
							<option value="is">Israel</option>
                            <option value="GW">Guinea-Bissau</option>
                            <option value="GY">Guyana</option>
                            <option value="HT">Haiti</option>
                            <option value="HM">Heard and Mc Donald Islands</option>
                            <option value="HN">Honduras</option>
                            <option value="HK">Hong Kong</option>
                            <option value="HU">Hungary</option>
                            <option value="IS">Iceland</option>
                            <option value="IN">India</option>
                            <option value="ID">Indonesia</option>
                            <option value="IR">Iran (Islamic Republic of)</option>
                            <option value="IQ">Iraq</option>
                            <option value="IE">Ireland</option>
                            <option value="IM">Isle of Man</option>
                            <option value="IT" selected="">Italy</option>
                            <option value="CI">Ivory Coast</option>
                            <option value="JM">Jamaica</option>
                            <option value="JP">Japan</option>
                            <option value="JE">Jersey</option>
                            <option value="JO">Jordan</option>
                            <option value="KZ">Kazakhstan</option>
                            <option value="KE">Kenya</option>
                            <option value="KI">Kiribati</option>
                            <option value="KP">Korea North</option>
                            <option value="KR">Korea South</option>
                            <option value="KW">Kuwait</option>
                            <option value="KG">Kyrgyzstan</option>
                            <option value="LA">Lao PeopleÕs Democratic Republic</option>
                            <option value="LA">Laos</option>
                            <option value="LV">Latvia</option>
                            <option value="LB">Lebanon</option>
                            <option value="LS">Lesotho</option>
                            <option value="LR">Liberia</option>
                            <option value="LY">Libyan Arab Jamahiriya</option>
                            <option value="LI">Liechtenstein</option>
                            <option value="LT">Lithuania</option>
                            <option value="LU">Luxembourg</option>
                            <option value="MO">Macao S.A.R.</option>
                            <option value="MO">Macau</option>
                            <option value="MK">Macedonia</option>
                            <option value="MG">Madagascar</option>
                            <option value="MW">Malawi</option>
                            <option value="MY">Malaysia</option>
                            <option value="MV">Maldives</option>
                            <option value="ML">Mali</option>
                            <option value="MT">Malta</option>
                            <option value="MH">Marshall Islands</option>
                            <option value="MQ">Martinique</option>
                            <option value="MR">Mauritania</option>
                            <option value="MU">Mauritius</option>
                            <option value="YT">Mayotte</option>
                            <option value="MX">Mexico</option>
                            <option value="FM">Micronesia Federated States of</option>
                            <option value="MD">Moldova Republic of</option>
                            <option value="MC">Monaco</option>
                            <option value="MN">Mongolia</option>
                            <option value="ME">Montenegro</option>
                            <option value="MS">Montserrat</option>
                            <option value="MA">Morocco</option>
                            <option value="MZ">Mozambique</option>
                            <option value="MM">Myanmar</option>
                            <option value="NA">Namibia</option>
                            <option value="NR">Nauru</option>
                            <option value="NP">Nepal</option>
                            <option value="NL">Netherlands</option>
                            <option value="AN">Netherlands Antilles</option>
                            <option value="NC">New Caledonia</option>
                            <option value="NZ">New Zealand</option>
                            <option value="NI">Nicaragua</option>
                            <option value="NE">Niger</option>
                            <option value="NG">Nigeria</option>
                            <option value="NU">Niue</option>
                            <option value="NF">Norfolk Island</option>
                            <option value="MP">Northern Mariana Islands</option>
                            <option value="NO">Norway</option>
                            <option value="OM">Oman</option>
                            <option value="PK">Pakistan</option>
                            <option value="PW">Palau</option>
                            <option value="PS">Palestinian Territory</option>
                            <option value="PA">Panama</option>
                            <option value="PG">Papua New Guinea</option>
                            <option value="PY">Paraguay</option>
                            <option value="PE">Peru</option>
                            <option value="PH">Philippines</option>
                            <option value="PN">Pitcairn</option>
                            <option value="PL">Poland</option>
                            <option value="PT">Portugal</option>
                            <option value="PR">Puerto Rico</option>
                            <option value="QA">Qatar</option>
                            <option value="RE">Reunion</option>
                            <option value="RO">Romania</option>
                            <option value="RU">Russian Federation</option>
                            <option value="RW">Rwanda</option>
                            <option value="BL">Saint Barthelemy</option>
                            <option value="SH">Saint Helena</option>
                            <option value="KN">Saint Kitts</option>
                            <option value="LC">Saint Lucia</option>
                            <option value="MF">Saint Martin (French part)</option>
                            <option value="PM">Saint Pierre and Miquelon</option>
                            <option value="VC">Saint Vincent Grenadines</option>
                            <option value="WS">Samoa</option>
                            <option value="SM">San Marino</option>
                            <option value="ST">Sao Tome and Principe</option>
                            <option value="SA">Saudi Arabia</option>
                            <option value="SN">Senegal</option>
                            <option value="RS">Serbia</option>
                            <option value="SC">Seychelles</option>
                            <option value="SL">Sierra Leone</option>
                            <option value="SG">Singapore</option>
                            <option value="SK">Slovakia (Slovak Republic)</option>
                            <option value="SI">Slovenia</option>
                            <option value="SB">Solomon Islands</option>
                            <option value="SO">Somalia</option>
                            <option value="ZA">South Africa</option>
                            <option value="GS">South Georgia and the South Sandwich Islands</option>
                            <option value="ES">Spain</option>
                            <option value="LK">Sri Lanka</option>
                            <option value="SD">Sudan</option>
                            <option value="SR">Suriname</option>
                            <option value="SJ">Svalbard and Jan Mayen Islands</option>
                            <option value="SZ">Swaziland</option>
                            <option value="SE">Sweden</option>
                            <option value="CH">Switzerland</option>
                            <option value="SY">Syrian Arab Republic</option>
                            <option value="TW">Taiwan</option>
                            <option value="TJ">Tajikistan</option>
                            <option value="TZ">Tanzania</option>
                            <option value="TH">Thailand</option>
                            <option value="TG">Togo</option>
                            <option value="TK">Tokelau</option>
                            <option value="TO">Tonga</option>
                            <option value="TT">Trinidad and Tobago</option>
                            <option value="TN">Tunisia</option>
                            <option value="TR">Turkey</option>
                            <option value="TM">Turkmenistan</option>
                            <option value="TC">Turks and Caicos Islands</option>
                            <option value="TV">Tuvalu</option>
                            <option value="UG">Uganda</option>
                            <option value="UA">Ukraine</option>
                            <option value="AE">United Arab Emirates</option>
                            <option value="GB">United Kingdom</option>
                            <option value="US">United States</option>
                            <option value="UM">United States Minor Outlying Islands</option>
                            <option value="UY">Uruguay</option>
                            <option value="USAF">US Armed Forces</option>
                            <option value="UZ">Uzbekistan</option>
                            <option value="VU">Vanuatu</option>
                            <option value="VA">Vatican City State (Holy See)</option>
                            <option value="VE">Venezuela</option>
                            <option value="VN">Vietnam</option>
                            <option value="VG">Virgin Islands (British)</option>
                            <option value="VI">Virgin Islands (US)</option>
                            <option value="WF">Wallis and Futuna Islands</option>
                            <option value="EH">Western Sahara</option>
                            <option value="YE">Yemen</option>
                            <option value="ZM">Zambia</option>
                            <option value="ZW">Zimbabwe</option>
						</select>
                        </div>
					</div>
                    <br>
					<div class="row">
						<div class="col-lg-4"><label>City<span style="color:#900">*</span> :<br><br></label></div>
						<div class="col-lg-8"><span role="status" aria-live="polite" class="ui-helper-hidden-accessible"></span>
						<input class="form-control ui-autocomplete-input" id="city" name="city" autocomplete="off" type="text"></div>
					</div>
                </form>
				</div>
				</div>
			
			</div>
            </div>
			</div>
            <div class="card-body">
			<div class="col-lg-12" id="hidden">
                <div class="card breadcrumb">
				<span>
                <div style="width:60%; float:left; padding-left:25px;">
	 <!-- <span class="asterisk"><strong>Step 1</strong></span><p style="text-align:left"> <span class="asterisk">(*)</span>&nbsp;Filed are mandatory</p>-->
				
                <h3 style="color:#900"><strong> STEP : 2</strong></h3>
				<br>
                <br>
                    <div class="row">
						<div class="col-lg-4"><label>Designation<span style="color:#900">*</span> :</label></div>
						<div class="col-lg-8"><input class="form-control" id="name" name="Designation" type="text"></div>
					</div>
                    <br>
					<div class="row">
						<div class="col-lg-4"><label>Company Website<span style="color:#900">*</span> :</label></div>
						<div class="col-lg-8"><input class="form-control" id="cname" name="co_web" type="text"></div>
					</div>
					<br>
					<div class="row">
						<div class="col-lg-4"><label>Landline No.<br>(With STD Code)<span style="color:#900">*</span>:</label></div>
						<div class="col-lg-8"><input class="form-control" id="email" name="co_Landline" type="text"></div>
					</div>
                    <br>
					<div class="row">
						<div class="col-lg-4"><label>Company Type<span style="color:#900">*</span> :<br><br></label></div>
						<div class="col-lg-8">
						<select name="CompanyType" id="CompanyType" class="form-control">
						<option value="" >Select</option>
						<option value="Private Limited">Private Limited</option>
                        <option value="Public Limited">Public Limited</option>
                        <option value="Limited Liability Partnership (LLP)">Limited Liability Partnership (LLP)</option>
                        <option value="Partnership" >Partnership</option>
						<option value="Sole Proprietorship" >Sole Proprietorship</option>
						<option value="Branch Office" >Branch Office</option>
						<option value="Subsidiary Company" >Subsidiary Company</option>
						<option value="others" >others </option>
						</select>
                        </div>
					</div>
                    <br>
					<div class="row">
						<div class="col-lg-4">
						<label>No. of employees<span class="asterisk"></span> :</label>
						</div>
						<div class="col-lg-8">
						<select class="selectpicker123 form-control" name="no_of_employees" id="no_of_employees">
							<option value="1-5">1-5</option>
							<option value="5-15">5-15</option>
							<option value="15-25">15-25</option>
							<option value="25-50">25-50</option>
							<option value="50-100">50-100</option>
							<option value="100-200">100-200</option>
							<option value="200-500">200-500</option>
							<option value="More than 500">More than 500</option>
						</select>
						</div>
					</div>
					
                    <br>
					<div class="row">
						<div class="col-lg-4"><label>Address<span style="color:#900">*</span> :<br><br></label></div>
						<div class="col-lg-8"><span role="status" aria-live="polite" class="ui-helper-hidden-accessible"></span>
						<input class="form-control ui-autocomplete-input" id="Address" name="Address" autocomplete="off" type="text"></div>
					</div>
					<div class="row">
						<div class="col-lg-4"><label>Trade Certifications<span style="color:#900">*</span> :<br><br></label></div>
						<div class="col-lg-4">
							<input type="checkbox" value="IATA" name="IATA[]"> IATA<br>
							<input type="checkbox" value="TAAI" name="TAAI[]"> TAAI<br>
							<input type="checkbox" value="TAFI" name="TAFI[]"> TAFI<br>
							<input type="checkbox" value="IATO" name="IATO[]"> IATO<br>
							<input type="checkbox" value="ADTOI" name="ADTOI[]"> ADTOI<br>
							<input type="checkbox" value="ASTA" name="ASTA[]"> ASTA<br>
							<input type="checkbox" value="PATA" name="PATA[]"> PATA<br>
							<input type="checkbox" value="OTOAI" name="OTOAI[]"> OTOAI<br>
						</div>
					</div>
					<br>
					<div class="row">
						<div class="col-lg-4"><label>Upload Company Logo<span style="color:#900">*</span> :<br><br></label></div>
						<div class="col-lg-8">
                        <input type="hidden" name="MAX_FILE_SIZE" value="800000" />
                        <input class="form-control" type="file" name="upload"><span style="color:red;">Optional</span></div>
					</div>
				</div>
                </span>
				</div>
			<div class="row">
                    	<div class="col-lg-4"><input type="submit" class="btn btn-primary" name="submit" value="finish" style="padding:15px; margin-top:20px; width:200px;">
                        </div>
            </div></form>

Open in new window

AHMED SAMYownerAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Leonidas DosasCommented:
What is the error message that you have?
0
Julian HansenCommented:
what is the problem in my code
We give up - what is the problem with it?

All you have given us is the code - please can you give us the problem as well.
What is your code supposed to do?
What is it not doing that it should?
What is it doing that it shouldn't?
What error messages are you getting?
0
AHMED SAMYownerAuthor Commented:
no result in data base
0
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

AHMED SAMYownerAuthor Commented:
HA HA HA HA HA
SORRY I GIVE UP THE SAME YOU
0
AHMED SAMYownerAuthor Commented:
i tried this code ti works

<?PHP


	if (isset($_POST['submit'])){
	
	$user_name=$_POST['user_name'];
	$co_name=$_POST['co_name'];
	$co_email=$_POST['co_email'];

	$connect=mysqli_connect("localhost","ahmed_samy","12@qw12@qw","cali_db");
	
	$sql="insert into users (user_name,co_name,co_email) values ('$user_name','$co_name','$co_email')";
	
	$query=mysqli_query($connect,$sql);
	
	echo "saved";
	}
	
?>

<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" enctype="multipart/form-data">
                    <div class="row">
						<div class="col-lg-4">
                        <label>Name<span style="color:#900">*</span> :</label></div>
						<div class="col-lg-8"><input class="form-control" id="name" name="us_name" type="text"></div>
					</div>
                    <br>
					<div class="row">
						<div class="col-lg-4"><label>Company Name<span style="color:#900">*</span> :</label></div>
						<div class="col-lg-8"><input class="form-control" id="cname" name="co_name" type="text"></div>
					</div>
					<br>
					<div class="row">
						<div class="col-lg-4"><label>Email Address<span style="color:#900">*</span>:</label></div>
						<div class="col-lg-8"><input class="form-control" id="email" name="co_email" type="text"></div>
					</div>
                    <br>
                    <div class="col-lg-4"><input type="submit" class="btn btn-primary" name="submit" value="finish" style="padding:15px; margin-top:20px; width:200px;">
                        </div>
</form>

Open in new window

0
AHMED SAMYownerAuthor Commented:
i have two files in my host when i use filezila

public_ftp

public_html

i upload to both of them
0
Julian HansenCommented:
no result in data base
We need more than this.

If you are unable to provide us with the information we need to help you then we will not be able to assist you further.

Please provide answers to the questions above so we can take this forward.
0
AHMED SAMYownerAuthor Commented:
All you have given us is the code - please can you give us the problem as well.

---- no action when i press finish
 
What is your code supposed to do?

---- i need to add this record to database


What is it not doing that it should?

---- i need to add this record to database


What is it doing that it shouldn't?

--- stop working why

What error messages are you getting?

no thing no actually action or any thing happen
0
Julian HansenCommented:
You need to take a look at your code specifically this bit
	$sql="INSERT INTO users(user_name,co_name,co_email,co_mobile,country_code,city,Designation,co_web,co_Landline,CompanyType,no_of_employees,Address,IATA,TAAI,TAFI,IATO,ADTOI,ASTA,PATA,OTOAI) VALUES('$user_name','$co_name','$co_email','$co_mobile','$country_code','$city','$Designation','$co_web','$co_Landline','$CompanyType','$no_of_employees','$Address','$IATA','$TAAI','$TAFI','$IATO','$ADTOI','$ASTA','$PATA','$OTOAI')";

		echo "<script type='text/javascript'> alert('company saved please check your email to confirm')</script>";
							
		header("location:index.php");

Open in new window


You are putting a header location statement after output but before you do anything with the database. This is wrong on many levels.

Advice
1. Disable the header() for now
2. Do your database insert and record the result
3. Then do your email
4. Then do your report back

Check the result from the INSERT make sure it did not fail - if it did then output the error.

That's where you need to start.
0
AHMED SAMYownerAuthor Commented:

i tried that code and it redirects me to index.php


<?php

if($_POST['submit'] && !empty($_FILES)){
	
	$formok=true;
	
	//inputs vars
	
	
	
	// file vars
	
	$path=$_FILES['upload']['tmp_name'];
	$name=$_FILES['upload']['name'];
	$size=$_FILES['upload']['size'];
	$type=$_FILES['upload']['type'];
	$error=$_FILES['upload']['error'];
	
	if(!is_uploaded_file($path)){
		
		$formok=false;
		echo "no file selected";
	}
	
	// check file extension 
	if(!in_array($type,array('image/png','image/x-png','image/jpeg','image/gif'))){
		
	$formok=false;
	echo "the file not image";
	
	}
	if(filesize($path) > 800000){
		
		$formok=false;
		echo "file size exceeds limit";
		}
	}
	if($formok){
		
		echo "ahmed samy";
		if($connect=mysqli_connect('localhost','ahmed_samy','12@qw12@qw','cali_db')){
			
		$test="SELECT * FROM users WHERE user_name='$user_name'";
		
		
		
		
		$user_name=$_POST['us_name'];
		$co_name=$_POST['co_name'];
		$co_email=$_POST['co_email'];
		$co_mobile=$_POST['co_mobile'];
		$country_code=$_POST['country_code'];
		$city=$_POST['city'];
		$Designation=$_POST['Designation'];
		$co_web=$_POST['co_web'];
		$co_Landline=$_POST['co_Landline'];
		$CompanyType=$_POST['CompanyType'];
		$no_of_employees=$_POST['no_of_employees'];
		$Address=$_POST['Address'];
		$IATA=$_POST['IATA'];
		$TAAI=$_POST['TAAI'];
		$TAFI=$_POST['TAFI'];
		$IATO=$_POST['IATO'];
		$ADTOI=$_POST['ADTOI'];
		$ASTA=$_POST['ASTA'];
		$PATA=$_POST['PATA'];
		$OTOAI=$_POST['OTOAI'];
	
		$content=file_get_contents($path);
		
		//$user_name=mysqli_real_escape_string($_POST['user_name']);
		//$co_name=mysqli_real_escape_string($_POST['co_name']);
		//$co_email=mysqli_real_escape_string($_POST['co_email']);
		//$co_mobile=mysqli_real_escape_string($_POST['co_mobile']);
		//$country_code=$_POST['country_code'];
		//$city=mysqli_real_escape_string($_POST['city']);
		//$Designation=mysqli_real_escape_string($_POST['Designation']);
		//$co_web=mysqli_real_escape_string($_POST['co_web']);
		//$co_Landline=$_POST['co_Landline'];
		//$CompanyType=$_POST['CompanyType'];
		//$no_of_employees=$_POST['no_of_employees'];
		//$Address=mysqli_real_escape_string($_POST['Address']);
		//$IATA=$_POST['IATA'];
		//$TAAI=$_POST['TAAI'];
		//$TAFI=$_POST['TAFI'];
		//$IATO=$_POST['IATO'];
		//$ADTOI=$_POST['ADTOI'];
		//$ASTA=$_POST['ASTA'];
		//$PATA=$_POST['PATA'];
		//$OTOAI=$_POST['OTOAI'];
		
		$sql="INSERT INTO users(user_name,co_name,co_email,co_mobile,country_code,city,Designation,co_web,co_Landline,CompanyType,no_of_employees,Address,IATA,TAAI,TAFI,IATO,ADTOI,ASTA,PATA,OTOAI) VALUES('$user_name','$co_name','$co_email','$co_mobile','$country_code','$city','$Designation','$co_web','$co_Landline','$CompanyType','$no_of_employees','$Address','$IATA','$TAAI','$TAFI','$IATO','$ADTOI','$ASTA','$PATA','$OTOAI')";

		$sqlimage="insert into images(name,size,type,content) values ('$name','$size','$type','$safeimage')";
		
		$querysql=mysqli_query($connect,$sql);
		
		$queryimage=mysqli_query($connect,$sqlimage);
		
		if($querysql && $queryimage){
			
			$imageid=mysqli_insert_id($connect);
			}
		
		echo "<script type='text/javascript'> alert('company saved please check your email to confirm')</script>";
							
							
		$to = "$co_email";
		$subject = "No-reply-Egitto";
		$txt = "visit this link to set your password http://egitto.egyptvision.net/setpassword.php";
		$headers = "From: accounts@egitto.com.eg." . "\r\n" .
			"CC: ahmed_bondok2006@yahoo.com";

		mail($to,$subject,$txt,$headers);
		
		
		
		
		mysqli_close($connect);
			}
			else{
				echo "<script type='text/javascript'> alert('no connection established')</script>";
				}
		echo "<script type='text/javascript'> alert('saved successfully....')</script>";
		}
		
		header("location:index.php");
?>

Open in new window

0
AHMED SAMYownerAuthor Commented:
it means he didn't excute any thing

right ?
0
AHMED SAMYownerAuthor Commented:
i know that you are tired from me

sorry
0
Julian HansenCommented:
Please remove (comment out) all header() statements. It is pointless having a redirect when your code is not working. First get the code working THEN add the header() statements.

All that you are doing now is "hiding" any error messages that might be displayed with a redirect.
0
AHMED SAMYownerAuthor Commented:
again i tried that code he told me saved without result in database

i am using php 5.6

<?PHP

	if ($connect=mysqli_connect("localhost","username","password","database")){
		
		$user_name=$_POST['us_name'];
		$co_name=$_POST['co_name'];
		$co_email=$_POST['co_email'];
		$co_mobile=$_POST['co_mobile'];
		$country_code=$_POST['country_code'];
		$city=$_POST['city'];
		$Designation=$_POST['Designation'];
		$co_web=$_POST['co_web'];
		$co_Landline=$_POST['co_Landline'];
		$CompanyType=$_POST['CompanyType'];
		$no_of_employees=$_POST['no_of_employees'];
		$Address=$_POST['Address'];
		$IATA=$_POST['IATA'];
		$TAAI=$_POST['TAAI'];
		$TAFI=$_POST['TAFI'];
		$IATO=$_POST['IATO'];
		$ADTOI=$_POST['ADTOI'];
		$ASTA=$_POST['ASTA'];
		$PATA=$_POST['PATA'];
		$OTOAI=$_POST['OTOAI'];
		
		$sql="INSERT INTO users(user_name,co_name,co_email,co_mobile,country_code,city,Designation,co_web,co_Landline,CompanyType,no_of_employees,Address,IATA,TAAI,TAFI,IATO,ADTOI,ASTA,PATA,OTOAI) 
		VALUES('$user_name','$co_email','$co_mobile','$country_code','$city','$Designation','$co_web','$co_Landline','$CompanyType','$no_of_employees','$Address','$IATA','$TAAI','$TAFI','$IATO','$ADTOI','$ASTA','$PATA','$OTOAI')";
		
		$query=mysqli_query($connect,$sql);
		echo "saved";
		
	}
	
?>

Open in new window

0
AHMED SAMYownerAuthor Commented:
note that

<?php echo $PHP_SELF; ?>
0
Julian HansenCommented:
$query=mysqli_query($connect,$sql);
		echo "saved";

Open in new window

There is no error checking on that code.

Change to

$result = mysqli_query($connect, $sql);
if (!$result) {
   echo "Query: {$sql} failed with " . mysqli_error($connect) . "<br>";
}
else {
   echo "Query was successful";
}

Open in new window

0
AHMED SAMYownerAuthor Commented:
nothing happened


<?PHP

	if ($connect=mysqli_connect("localhost","ahmed_samy","12@qw12@qw","cali_db")){
		
		if(isset($_POST['submit'])){
			
			$user_name=$_POST['us_name'];
			$co_name=$_POST['co_name'];
			$co_email=$_POST['co_email'];
			$co_mobile=$_POST['co_mobile'];
			$country_code=$_POST['country_code'];
			$city=$_POST['city'];
			$Designation=$_POST['Designation'];
			$co_web=$_POST['co_web'];
			$co_Landline=$_POST['co_Landline'];
			$CompanyType=$_POST['CompanyType'];
			$no_of_employees=$_POST['no_of_employees'];
			$Address=$_POST['Address'];
			$IATA=$_POST['IATA'];
			$TAAI=$_POST['TAAI'];
			$TAFI=$_POST['TAFI'];
			$IATO=$_POST['IATO'];
			$ADTOI=$_POST['ADTOI'];
			$ASTA=$_POST['ASTA'];
			$PATA=$_POST['PATA'];
			$OTOAI=$_POST['OTOAI'];
			
			$sql="INSERT INTO users(user_name,co_name,co_email,co_mobile,country_code,city,Designation,co_web,co_Landline,CompanyType,no_of_employees,Address,IATA,TAAI,TAFI,IATO,ADTOI,ASTA,PATA,OTOAI) 
			VALUES('$user_name','$co_email','$co_mobile','$country_code','$city','$Designation','$co_web','$co_Landline','$CompanyType','$no_of_employees','$Address','$IATA','$TAAI','$TAFI','$IATO','$ADTOI','$ASTA','$PATA','$OTOAI')";
			
			$result=mysqli_query($connect,$sql);
			if (!$result) {
			   echo "Query: {$sql} failed with " . mysqli_error($connect) . "<br>";
			}
			else {
			   echo "Query was successful";
			}
		}
	}
	
?>

Open in new window

0
Julian HansenCommented:
The only other possibility is this
if(isset($_POST['submit'])){

Open in new window

Rather do this
if ($_POST) {

Open in new window

0
AHMED SAMYownerAuthor Commented:
is this problem related to php version
0
AHMED SAMYownerAuthor Commented:
ohhhhhhhhhhhh

there is responds

Query: INSERT INTO users(user_name,co_name,co_email,co_mobile) VALUES('1','aaaaaa','2222222222222222') failed with
0
AHMED SAMYownerAuthor Commented:
what i did last i found

</form>

</form>

twice time in this page

thats only an noticed thing
0
AHMED SAMYownerAuthor Commented:
and i try another code that

<?php

class mysql{
	
	private $localhost="localhost";
	private $db_users="ahmed_samy";
	private $db_password="12@qw12@qw";
	private $db_name="cali_db";

	function __construct(){
		
	mysql_connect($this->localhost,$this->db_users,$this->db_password);
	mysql_select_db($this->db_name);
	
	}
	
	function sql(){
		
		if ($_POST['submit']){
			
			$user_name=$_POST['us_name'];
			$co_name=$_POST['co_name'];
			$co_email=$_POST['co_email'];
			$co_mobile=$_POST['co_mobile'];
			
			
			
			$sql="INSERT INTO users(user_name,co_name,co_email,co_mobile) 
			VALUES('$user_name','$co_email','$co_mobile')";
			
			$result=mysql_query($sql);
			if (!$result) {
			   echo "Query: {$sql} failed with " . mysqli_error($connect) . "<br>";
			}
			else {
			   echo "Query was successful";
			}
					
			
		}	
		
		
	}	
}
$use=new mysql;
$use->sql();

?>

Open in new window

0
Julian HansenCommented:
is this problem related to php version
No

Your last implementation is incorrect
$result=mysql_query($sql);
if (!$result) {
   echo "Query: {$sql} failed with " . mysqli_error($connect) . "<br>";
}
else {
   echo "Query was successful";
}

Open in new window

Is not the same as
$result=mysqli_query($connect,$sql);
if (!$result) {
   echo "Query: {$sql} failed with " . mysqli_error($connect) . "<br>";
}
else {
   echo "Query was successful";
}

Open in new window

mysql_query instead of mysqli_query($connect, $sql)
0
AHMED SAMYownerAuthor Commented:
ohhhhhhhhhhhhhhhhhhh

at last i very happy

Query was successful

my last code is

register.php


<?php

class mysql{
	
	private $localhost="localhost";
	private $db_users="ahmed_samy";
	private $db_password="12@qw12@qw";
	private $db_name="cali_db";

	function __construct(){
		
	mysql_connect($this->localhost,$this->db_users,$this->db_password);
	mysql_select_db($this->db_name);
	
	}
	
	function sql(){
		
		if ($_POST['submit']){
			
			$user_name=$_POST['us_name'];
			$co_name=$_POST['co_name'];
			$co_email=$_POST['co_email'];
			$co_mobile=$_POST['co_mobile'];
			$country_code=$_POST['country_code'];
			$city=$_POST['city'];
			$Designation=$_POST['Designation'];
			$co_web=$_POST['co_web'];
			$co_Landline=$_POST['co_Landline'];
			$CompanyType=$_POST['CompanyType'];
			$no_of_employees=$_POST['no_of_employees'];
			$Address=$_POST['Address'];
			$IATA=$_POST['IATA'];
			$TAAI=$_POST['TAAI'];
			$TAFI=$_POST['TAFI'];
			$IATO=$_POST['IATO'];
			$ADTOI=$_POST['ADTOI'];
			$ASTA=$_POST['ASTA'];
			$PATA=$_POST['PATA'];
			$OTOAI=$_POST['OTOAI'];
			
			
			
			$sql="INSERT INTO users(user_name,co_name,co_email,co_mobile,country_code,city,Designation,co_web,co_Landline,CompanyType,no_of_employees,Address,IATA,TAAI,TAFI,IATO,ADTOI,ASTA,PATA,OTOAI) VALUES('$user_name','$co_name','$co_email','$co_mobile','$country_code','$city','$Designation','$co_web','$co_Landline','$CompanyType','$no_of_employees','$Address','$IATA','$TAAI','$TAFI','$IATO','$ADTOI','$ASTA','$PATA','$OTOAI')";

			
			$result=mysql_query($sql);
			if (!$result) {
			   echo "Query: {$sql} failed with " . mysql_error($connect) . "<br>";
			}
			else {
			   echo "Query was successful";
			}
					
			
		}	
		
		
	}	
}
$use=new mysql;
$use->sql();

?>

Open in new window



and test.php is



<!DOCTYPE html>
<html lang="en">

  <head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>Create An Account</title>

    <!-- Bootstrap core CSS -->
    <link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">

    <!-- Custom styles for this template -->
    <link href="css/modern-business.css" rel="stylesheet">
    <link href="css/jquery-ui.css" rel="stylesheet">
    
        
		<!-- bookmark page -->
    <link rel="stylesheet" href="css/addtohomescreen.css">
	<script src="js/addtohomescreen.js"></script>

	<!-- Additionally, include jQuery (necessary for bookmark script) -->
	<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
    
    
    <style>
	
		#bookmark-this {
		  padding: 5px 10px;
		  background-color: #f0ad4e;
		  border: 1px solid #eea236;
		  border-radius: 4px;
		  font-size: 12px;
		  color: #fff;
		  text-decoration: none;
		  text-shadow: 0 -1px 0 rgba(0, 0, 0, .2);
		  -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 1px 1px rgba(0, 0, 0, 0.2);
		  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 1px 1px rgba(0, 0, 0, 0.2);
		  -webkit-user-select:none;
		  -moz-user-select:none;
		  -ms-user-select:none;
		  user-select:none;
		}
		
		#bookmark-this:hover {
		  background-color: #ec971f;
		  border: 1px solid #d58512;
		  text-decoration: none;
		}
		
		#bookmark-this:active {
		  background-color: #ec971f;
		  border: 1px solid #d58512;
		  -webkit-box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.2);
		  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.2);
		}
			
	</style>
    <!-- end of bookmark page -->

  </head>

  <body>

    <!-- Navigation -->
    <nav class="navbar fixed-top navbar-expand-lg navbar-dark bg-dark fixed-top">
      <div class="container">
        <a class="navbar-brand" href="index.php">egitto</a>
        <button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
          <span class="navbar-toggler-icon"></span>
        </button>
        <div class="collapse navbar-collapse" id="navbarResponsive">
          <ul class="navbar-nav ml-auto">
            <li class="nav-item">
              <a class="nav-link" href="index.php">Home</a>
            </li>
            <li class="nav-item">
              <a class="nav-link" href="OfflineEnquiry.php">Offline Enquiry</a>
            </li>
            <li class="nav-item">
              <a class="nav-link" href="aboutus.php">About us</a>
            </li>
            <li class="nav-item">
              <a class="nav-link" href="contact.php">Contact us</a>
            </li>
            <li class="nav-item">
              <a class="nav-link" id="bookmark-this" href="#" title="Bookmark This Page">Bookmark This Page</a>
            </li>
          </ul>
        </div>
      </div>
    </nav>

    <header>
    
    
    
<div id="carouselExampleIndicators" class="carousel slide" data-ride="carousel">
        
	<div class="carousel-inner" role="listbox">
          <!-- Slide One - Set the background image for this slide in the line below -->
		<div class="row" style="padding:15px;">
			<div class="card-body">
			<div class="col-lg-12" id="show">
				<div class="card breadcrumb">
				<span>

				<div style="width:60%; float:left; padding-left:25px;">
	 <!-- <span class="asterisk"><strong>Step 1</strong></span><p style="text-align:left"> <span class="asterisk">(*)</span>&nbsp;Filed are mandatory</p>-->
				<h3 style="color:#900"><strong> STEP : 1</strong></h3>
				<br>
                <br>
				<form action="register.php" method="post">
                    <div class="row">
						<div class="col-lg-4">
                        <label>Name<span style="color:#900">*</span> :</label></div>
						<div class="col-lg-8"><input class="form-control" id="us_name" name="us_name" type="text"></div>
					</div>
                    <br>
					<div class="row">
						<div class="col-lg-4"><label>Company Name<span style="color:#900">*</span> :</label></div>
						<div class="col-lg-8"><input class="form-control" id="co_name" name="co_name" type="text"></div>
					</div>
					<br>
					<div class="row">
						<div class="col-lg-4"><label>Email Address<span style="color:#900">*</span>:</label></div>
						<div class="col-lg-8"><input class="form-control" id="co_email" name="co_email" type="text"></div>
					</div>
                    <br>
					<div class="row">
						<div class="col-lg-4"><label>Mobile No<span style="color:#900">*</span> :<br><br></label></div>
						<div class="col-lg-8"><input class="form-control" id="co_mobile" name="co_mobile" type="text"></div>
					</div>
                    <br>
					<div class="row">
						<div class="col-lg-4"><label>Country<span style="color:#900">*</span> :</label></div>
						<div class="col-lg-8">
						<select name="country_code" id="country_code" class="form-control">
                            <option value="Afghanistan">Afghanistan</option>
                            <option value="Aland Islands">Aland Islands</option>
                            <option value="Albania">Albania</option>
                            <option value="Algeria">Algeria</option>
                            <option value="American Samoa">American Samoa</option>
                            <option value="Andorra">Andorra</option>
                            <option value="AO">Angola</option>
                            <option value="AI">Anguilla</option>
                            <option value="AQ">Antarctica</option>
                            <option value="AG">Antigua and Barbuda</option>
                            <option value="AR">Argentina</option>
                            <option value="AW">Aruba</option>
                            <option value="AU">Australian</option>
                            <option value="AT">Austria</option>
                            <option value="AZ">Azerbaijan</option>
                            <option value="BS">Bahamas</option>
                            <option value="BH">Bahrain</option>
                            <option value="BD">Bangladesh</option>
                            <option value="BB">Barbados</option>
                            <option value="BY">Belarus</option>
                            <option value="BE">Belgium</option>
                            <option value="BZ">Belize</option>
                            <option value="BJ">Benin</option>
                            <option value="BM">Bermuda</option>
                            <option value="BT">Bhutan</option>
                            <option value="BO">Bolivia</option>
                            <option value="BA">Bosnia and Herzegovina</option>
                            <option value="BW">Botswana</option>
                            <option value="BV">Bouvet Island</option>
                            <option value="BR">Brazil</option>
                            <option value="IO">British Indian Ocean Territory</option>
                            <option value="BN">Brunei Darussalam</option>
                            <option value="BG">Bulgaria</option>
                            <option value="BF">Burkina Faso</option>
                            <option value="BI">Burundi</option>
                            <option value="KH">Cambodia</option>
                            <option value="CM">Cameroon</option>
                            <option value="CA">Canada</option>
                            <option value="CV">Cape Verde</option>
                            <option value="KY">Cayman Islands</option>
                            <option value="CF">Central African Republic</option>
                            <option value="TD">Chad</option>
                            <option value="CL">Chile</option>
                            <option value="CN">China</option>
                            <option value="CX">Christmas Island</option>
                            <option value="CC">Cocos (Keeling) Islands</option>
                            <option value="CO">Colombia</option>
                            <option value="KM">Comoros</option>
                            <option value="CD">Congo (Kinshasa)</option>
                            <option value="CG">Congo Republic of the Democratic</option>
                            <option value="CD">Congo-Brazzaville</option>
                            <option value="CK">Cook Islands</option>
                            <option value="CR">Costa Rica</option>
                            <option value="HR">Croatia (Hrvatska)</option>
                            <option value="CU">Cuba</option>
                            <option value="CY">Cyprus</option>
                            <option value="CZ">Czech Republic</option>
                            <option value="DK">Denmark</option>
                            <option value="DJ">Djibouti</option>
                            <option value="DM">Dominica</option>
                            <option value="DO">Dominican Republic</option>
                            <option value="TP">East Timor</option>
                            <option value="EC">Ecuador</option>
                            <option value="EG">Egypt</option>
                            <option value="SV">El Salvador</option>
                            <option value="GQ">Equatorial Guinea</option>
                            <option value="ER">Eritrea</option>
                            <option value="EE">Estonia</option>
                            <option value="ET">Ethiopia</option>
                            <option value="FK">Falkland Islands (Malvinas)</option>
                            <option value="FO">Faroe Islands</option>
                            <option value="FJ">Fiji</option>
                            <option value="FI">Finland</option>
                            <option value="FR">France</option>
                            <option value="GF">French Guiana</option>
                            <option value="PF">French Polynesia</option>
                            <option value="TF">French Southern Territories</option>
                            <option value="GA">Gabon</option>
                            <option value="GM">Gambia</option>
                            <option value="GE">Georgia</option>
                            <option value="DE">Germany</option>
                            <option value="GH">Ghana</option>
                            <option value="GI">Gibraltar</option>
                            <option value="GR">Greece</option>
                            <option value="GL">Greenland</option>
                            <option value="GD">Grenada</option>
                            <option value="GP">Guadeloupe</option>
                            <option value="GU">Guam</option>
                            <option value="GT">Guatemala</option>
                            <option value="GG">Guernsey</option>
                            <option value="GN">Guinea</option>
							<option value="is">Israel</option>
                            <option value="GW">Guinea-Bissau</option>
                            <option value="GY">Guyana</option>
                            <option value="HT">Haiti</option>
                            <option value="HM">Heard and Mc Donald Islands</option>
                            <option value="HN">Honduras</option>
                            <option value="HK">Hong Kong</option>
                            <option value="HU">Hungary</option>
                            <option value="IS">Iceland</option>
                            <option value="IN">India</option>
                            <option value="ID">Indonesia</option>
                            <option value="IR">Iran (Islamic Republic of)</option>
                            <option value="IQ">Iraq</option>
                            <option value="IE">Ireland</option>
                            <option value="IM">Isle of Man</option>
                            <option value="IT" selected="">Italy</option>
                            <option value="CI">Ivory Coast</option>
                            <option value="JM">Jamaica</option>
                            <option value="JP">Japan</option>
                            <option value="JE">Jersey</option>
                            <option value="JO">Jordan</option>
                            <option value="KZ">Kazakhstan</option>
                            <option value="KE">Kenya</option>
                            <option value="KI">Kiribati</option>
                            <option value="KP">Korea North</option>
                            <option value="KR">Korea South</option>
                            <option value="KW">Kuwait</option>
                            <option value="KG">Kyrgyzstan</option>
                            <option value="LA">Lao PeopleÕs Democratic Republic</option>
                            <option value="LA">Laos</option>
                            <option value="LV">Latvia</option>
                            <option value="LB">Lebanon</option>
                            <option value="LS">Lesotho</option>
                            <option value="LR">Liberia</option>
                            <option value="LY">Libyan Arab Jamahiriya</option>
                            <option value="LI">Liechtenstein</option>
                            <option value="LT">Lithuania</option>
                            <option value="LU">Luxembourg</option>
                            <option value="MO">Macao S.A.R.</option>
                            <option value="MO">Macau</option>
                            <option value="MK">Macedonia</option>
                            <option value="MG">Madagascar</option>
                            <option value="MW">Malawi</option>
                            <option value="MY">Malaysia</option>
                            <option value="MV">Maldives</option>
                            <option value="ML">Mali</option>
                            <option value="MT">Malta</option>
                            <option value="MH">Marshall Islands</option>
                            <option value="MQ">Martinique</option>
                            <option value="MR">Mauritania</option>
                            <option value="MU">Mauritius</option>
                            <option value="YT">Mayotte</option>
                            <option value="MX">Mexico</option>
                            <option value="FM">Micronesia Federated States of</option>
                            <option value="MD">Moldova Republic of</option>
                            <option value="MC">Monaco</option>
                            <option value="MN">Mongolia</option>
                            <option value="ME">Montenegro</option>
                            <option value="MS">Montserrat</option>
                            <option value="MA">Morocco</option>
                            <option value="MZ">Mozambique</option>
                            <option value="MM">Myanmar</option>
                            <option value="NA">Namibia</option>
                            <option value="NR">Nauru</option>
                            <option value="NP">Nepal</option>
                            <option value="NL">Netherlands</option>
                            <option value="AN">Netherlands Antilles</option>
                            <option value="NC">New Caledonia</option>
                            <option value="NZ">New Zealand</option>
                            <option value="NI">Nicaragua</option>
                            <option value="NE">Niger</option>
                            <option value="NG">Nigeria</option>
                            <option value="NU">Niue</option>
                            <option value="NF">Norfolk Island</option>
                            <option value="MP">Northern Mariana Islands</option>
                            <option value="NO">Norway</option>
                            <option value="OM">Oman</option>
                            <option value="PK">Pakistan</option>
                            <option value="PW">Palau</option>
                            <option value="PS">Palestinian Territory</option>
                            <option value="PA">Panama</option>
                            <option value="PG">Papua New Guinea</option>
                            <option value="PY">Paraguay</option>
                            <option value="PE">Peru</option>
                            <option value="PH">Philippines</option>
                            <option value="PN">Pitcairn</option>
                            <option value="PL">Poland</option>
                            <option value="PT">Portugal</option>
                            <option value="PR">Puerto Rico</option>
                            <option value="QA">Qatar</option>
                            <option value="RE">Reunion</option>
                            <option value="RO">Romania</option>
                            <option value="RU">Russian Federation</option>
                            <option value="RW">Rwanda</option>
                            <option value="BL">Saint Barthelemy</option>
                            <option value="SH">Saint Helena</option>
                            <option value="KN">Saint Kitts</option>
                            <option value="LC">Saint Lucia</option>
                            <option value="MF">Saint Martin (French part)</option>
                            <option value="PM">Saint Pierre and Miquelon</option>
                            <option value="VC">Saint Vincent Grenadines</option>
                            <option value="WS">Samoa</option>
                            <option value="SM">San Marino</option>
                            <option value="ST">Sao Tome and Principe</option>
                            <option value="SA">Saudi Arabia</option>
                            <option value="SN">Senegal</option>
                            <option value="RS">Serbia</option>
                            <option value="SC">Seychelles</option>
                            <option value="SL">Sierra Leone</option>
                            <option value="SG">Singapore</option>
                            <option value="SK">Slovakia (Slovak Republic)</option>
                            <option value="SI">Slovenia</option>
                            <option value="SB">Solomon Islands</option>
                            <option value="SO">Somalia</option>
                            <option value="ZA">South Africa</option>
                            <option value="GS">South Georgia and the South Sandwich Islands</option>
                            <option value="ES">Spain</option>
                            <option value="LK">Sri Lanka</option>
                            <option value="SD">Sudan</option>
                            <option value="SR">Suriname</option>
                            <option value="SJ">Svalbard and Jan Mayen Islands</option>
                            <option value="SZ">Swaziland</option>
                            <option value="SE">Sweden</option>
                            <option value="CH">Switzerland</option>
                            <option value="SY">Syrian Arab Republic</option>
                            <option value="TW">Taiwan</option>
                            <option value="TJ">Tajikistan</option>
                            <option value="TZ">Tanzania</option>
                            <option value="TH">Thailand</option>
                            <option value="TG">Togo</option>
                            <option value="TK">Tokelau</option>
                            <option value="TO">Tonga</option>
                            <option value="TT">Trinidad and Tobago</option>
                            <option value="TN">Tunisia</option>
                            <option value="TR">Turkey</option>
                            <option value="TM">Turkmenistan</option>
                            <option value="TC">Turks and Caicos Islands</option>
                            <option value="TV">Tuvalu</option>
                            <option value="UG">Uganda</option>
                            <option value="UA">Ukraine</option>
                            <option value="AE">United Arab Emirates</option>
                            <option value="GB">United Kingdom</option>
                            <option value="US">United States</option>
                            <option value="UM">United States Minor Outlying Islands</option>
                            <option value="UY">Uruguay</option>
                            <option value="USAF">US Armed Forces</option>
                            <option value="UZ">Uzbekistan</option>
                            <option value="VU">Vanuatu</option>
                            <option value="VA">Vatican City State (Holy See)</option>
                            <option value="VE">Venezuela</option>
                            <option value="VN">Vietnam</option>
                            <option value="VG">Virgin Islands (British)</option>
                            <option value="VI">Virgin Islands (US)</option>
                            <option value="WF">Wallis and Futuna Islands</option>
                            <option value="EH">Western Sahara</option>
                            <option value="YE">Yemen</option>
                            <option value="ZM">Zambia</option>
                            <option value="ZW">Zimbabwe</option>
						</select>
                        </div>
					</div>
                    <br>
					<div class="row">
						<div class="col-lg-4"><label>City<span style="color:#900">*</span> :<br><br></label></div>
						<div class="col-lg-8"><span role="status" aria-live="polite" class="ui-helper-hidden-accessible"></span>
						<input class="form-control" id="city" name="city" autocomplete="off" type="text"></div>
					</div>
				</div>
				</div>
			
			</div>
            </div>
			</div>
            <div class="card-body">
			<div class="col-lg-12" id="hidden">
                <div class="card breadcrumb">
				<span>
                <div style="width:60%; float:left; padding-left:25px;">
	 <!-- <span class="asterisk"><strong>Step 1</strong></span><p style="text-align:left"> <span class="asterisk">(*)</span>&nbsp;Filed are mandatory</p>-->
				
                <h3 style="color:#900"><strong> STEP : 2</strong></h3>
				<br>
                <br>
                    <div class="row">
						<div class="col-lg-4"><label>Designation<span style="color:#900">*</span> :</label></div>
						<div class="col-lg-8"><input class="form-control" id="Designation" name="Designation" type="text"></div>
					</div>
                    <br>
					<div class="row">
						<div class="col-lg-4"><label>Company Website<span style="color:#900">*</span> :</label></div>
						<div class="col-lg-8"><input class="form-control" id="co_web" name="co_web" type="text"></div>
					</div>
					<br>
					<div class="row">
						<div class="col-lg-4"><label>Landline No.<br>(With STD Code)<span style="color:#900">*</span>:</label></div>
						<div class="col-lg-8"><input class="form-control" id="co_Landline" name="co_Landline" type="text"></div>
					</div>
                    <br>
					<div class="row">
						<div class="col-lg-4"><label>Company Type<span style="color:#900">*</span> :<br><br></label></div>
						<div class="col-lg-8">
						<select name="CompanyType" id="CompanyType" class="form-control">
						<option value="" >Select</option>
						<option value="Private Limited">Private Limited</option>
                        <option value="Public Limited">Public Limited</option>
                        <option value="Limited Liability Partnership (LLP)">Limited Liability Partnership (LLP)</option>
                        <option value="Partnership" >Partnership</option>
						<option value="Sole Proprietorship" >Sole Proprietorship</option>
						<option value="Branch Office" >Branch Office</option>
						<option value="Subsidiary Company" >Subsidiary Company</option>
						<option value="others" >others </option>
						</select>
                        </div>
					</div>
                    <br>
					<div class="row">
						<div class="col-lg-4">
						<label>No. of employees<span class="asterisk"></span> :</label>
						</div>
						<div class="col-lg-8">
						<select class="selectpicker123 form-control" name="no_of_employees" id="no_of_employees">
							<option value="1-5">1-5</option>
							<option value="5-15">5-15</option>
							<option value="15-25">15-25</option>
							<option value="25-50">25-50</option>
							<option value="50-100">50-100</option>
							<option value="100-200">100-200</option>
							<option value="200-500">200-500</option>
							<option value="More than 500">More than 500</option>
						</select>
						</div>
					</div>
					
                    <br>
					<div class="row">
						<div class="col-lg-4"><label>Address<span style="color:#900">*</span> :<br><br></label></div>
						<div class="col-lg-8"><span role="status" aria-live="polite" class="ui-helper-hidden-accessible"></span>
						<input class="form-control ui-autocomplete-input" id="Address" name="Address" autocomplete="off" type="text"></div>
					</div>
					<div class="row">
						<div class="col-lg-4"><label>Trade Certifications<span style="color:#900">*</span> :<br><br></label></div>
						<div class="col-lg-4">
							<input type="checkbox" value="IATA" name="IATA[]"> IATA<br>
							<input type="checkbox" value="TAAI" name="TAAI[]"> TAAI<br>
							<input type="checkbox" value="TAFI" name="TAFI[]"> TAFI<br>
							<input type="checkbox" value="IATO" name="IATO[]"> IATO<br>
							<input type="checkbox" value="ADTOI" name="ADTOI[]"> ADTOI<br>
							<input type="checkbox" value="ASTA" name="ASTA[]"> ASTA<br>
							<input type="checkbox" value="PATA" name="PATA[]"> PATA<br>
							<input type="checkbox" value="OTOAI" name="OTOAI[]"> OTOAI<br>
						</div>
					</div>
					<br>
					<div class="row">
						<div class="col-lg-4"><label>Upload Company Logo<span style="color:#900">*</span> :<br><br></label></div>
						<div class="col-lg-8">
                        <input type="hidden" name="MAX_FILE_SIZE" value="800000" />
                        <input class="form-control" type="file" name="upload"><span style="color:red;">Optional</span></div>
					</div>
				</div>
                </span>
				</div>
			<div class="row">
                    	<div class="col-lg-4">
						<input type="submit" class="btn btn-primary" name="submit" value="finish" style="padding:15px; margin-top:20px; width:200px;">
                        </div>
            </div>
			</form>
			</div>
            <br>
			</div>
		</div>
	</div>
</div>
</header>

        <script>
        
        jQuery(function($) {
          
          $('#bookmark-this').click(function(e) {
            var bookmarkURL = window.location.href;
            var bookmarkTitle = document.title;
        
            if ('addToHomescreen' in window && addToHomescreen.isCompatible) {
              // Mobile browsers
              addToHomescreen({ autostart: false, startDelay: 0 }).show(true);
            } else if (window.sidebar && window.sidebar.addPanel) {
              // Firefox <=22
              window.sidebar.addPanel(bookmarkTitle, bookmarkURL, '');
            } else if ((window.sidebar && /Firefox/i.test(navigator.userAgent)) || (window.opera && window.print)) {
              // Firefox 23+ and Opera <=14
              $(this).attr({
                href: bookmarkURL,
                title: bookmarkTitle,
                rel: 'sidebar'
              }).off(e);
              return true;
            } else if (window.external && ('AddFavorite' in window.external)) {
              // IE Favorites
              window.external.AddFavorite(bookmarkURL, bookmarkTitle);
            } else {
              // Other browsers (mainly WebKit & Blink - Safari, Chrome, Opera 15+)
              alert('Press ' + (/Mac/i.test(navigator.userAgent) ? 'Cmd' : 'Ctrl') + '+D to bookmark this page.');
            }
        
            return false;
          });
          
        });
        
        
        </script>

</body>
     
    <!-- /.container -->

    <!-- Footer -->
    <footer class="py-5 bg-dark">
      <div class="container">
      	
        <div>
        	<ul class="list-group" style="display:inline;">
            	<li class="list-group" style="float:left; padding-left:10px"><a href="index.php">Home</a></li>
                <li class="list-group" style="float:left; padding-left:10px"><a href="aboutus.php">About Us</a></li>
                <li class="list-group" style="float:left; padding-left:10px">
                	<a href="TermsConditions.php">Terms Conditions</a>
                </li>
                <li class="list-group" style="float:left; padding-left:10px">
                	<a href="PrivacyPolicy.php">Privacy Policy</a>
                </li>
                <li class="list-group" style="float:left; padding-left:10px">
                	<a href="CancellationPolicy.php">Cancellation Policy</a>
                </li>
        	</ul>
        </div>
        <p class="m-0 text-center text-white">Copyright &copy; egitto 2017</p>
      </div>
      <!-- /.container -->
    </footer>

    <!-- Bootstrap core JavaScript -->
    <script src="vendor/jquery/jquery.min.js"></script>
    <script src="vendor/popper/popper.min.js"></script>
    <script src="vendor/bootstrap/js/bootstrap.min.js"></script>


</html>

Open in new window



but still small problem is check box value appears in database   (array)
0
Julian HansenCommented:
name="IATA[]

Open in new window

This tells PHP that your variable is an array. Unless you are submitting an array of values then leave the [ ] off.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
AHMED SAMYownerAuthor Commented:
thats right how can i help  you are great supporter


sure that

close question?? and give you best answer???  or how can i help you???? and see you in next question
0
AHMED SAMYownerAuthor Commented:
thanks you very very very very much
0
Julian HansenCommented:
You are most welcome Ahmed.
0
AHMED SAMYownerAuthor Commented:
thanks respected  Julian Hansen
i did it get  [clientname] =>
it is empty i don't know why

i give it name and it is correct
and have value ??????
0
AHMED SAMYownerAuthor Commented:
i got it don't waste time
0
AHMED SAMYownerAuthor Commented:
thanks too much

but still images not appear
0
AHMED SAMYownerAuthor Commented:
<div class="row">
        <p style="float: left"><?php  echo '<img src="data:image/jpeg;base64,'.base64_encode($resultname['content']).'" width="50" height="50px"/>'; ?>&nbsp;&nbsp;<h2 class="card-header" style="color: darkred"><?php echo $resultname['co_name']; ?></h2></p>
    </div>

Open in new window

0
AHMED SAMYownerAuthor Commented:
sorry array is empty
0
AHMED SAMYownerAuthor Commented:
Array ( [0] => 503 [1] => Alexandria e le Oasi del nord [2] => 02/15/18 [3] => 03/02/2018 [4] => 15 Minuti [5] => 2 [6] => [7] => [8] => [9] => Toyota Coaster Minibus [10] => Breakfast/Dinner [11] => ahmed [12] => Fairmont Heliopolis [13] => yyyyyyyyyyyyyyyy )

i print values from first page after submit button
from this element

<a href="echo.php?wordText=<?php echo $Request_word; ?>" class="btn btn-primary">echo</a>
0
Julian HansenCommented:
I am not sure where we are - do you still have a problem?
0
AHMED SAMYownerAuthor Commented:
what i mean i have <a> tag i need to pass this value but in fact this values comes after submit button only

if i click this <a> tag next page have nothing to view
0
Julian HansenCommented:
The <a> tag is a link it is not involved in form submissions. The only way to have an <a> submit / pass a value as part of a submit is to use AJAX.

The question is why do you want to use an <a> to submit a value?
1
AHMED SAMYownerAuthor Commented:
oh i understand this

thanks i will change the way that is right

thanks Julian Hansen
0
Julian HansenCommented:
You are most welcome Ahmed Samy,
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
HTML

From novice to tech pro — start learning today.