Jump to content

bakigkgz

Members
  • Posts

    24
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

bakigkgz's Achievements

Member

Member (2/5)

0

Reputation

  1. bakigkgz

    baki

    this code work in google chrome browser but it does not work IE and mozilla firefox browser why? <?php $connect = mysql_pconnect("localhost","root",""); if (!$connect) { die('Veri Tabanı bağlantı hatası: ' . mysql_error()); } mysql_select_db("bony_talep", $connect); mysql_query("SET CHARACTER SET UTF8"); ?> <html> <head> <title>Talep Form</title> <script type="text/javascript"> function sil() { var ele = document.getElementById('text_ekle'); ele.parentNode.removeChild(ele); } function sil1() { var ele1 = document.getElementById('sehir1'); ele1.parentNode.removeChild(ele1); } function bul () { //window.location="talepson.php"; var select_ulke = document.talep_form.ulkeler; var selected_ulke = select_ulke.options[select_ulke.selectedIndex].text; if(selected_ulke=="Turkiye") { sil(); var element = document.createElement("select"); element.type ="text"; element.name ="sehir1"; element.id ="sehir1"; element.size = "1"; document.getElementsByName("talep_form")[0].appendChild(element); //var select_bolge = document.talep_form.ulkeler; var select_il = document.talep_form.sehir1; //var selected_bolge = select_bolge.options[select_bolge.selectedIndex].value; var Akdeniz = new Array("Adana", "Antalya", "Burdur", "Hatay", "Isparta", "Kilis", "Mersin", "Osmaniye"); for(var i=0; i<Akdeniz.length; i++) { select_il.options[select_il.options.length] = new Option(Akdeniz); } } else { sil1(); var element = document.createElement("input"); element.type ="text"; element.name ="text_ekle"; element.id ="text_ekle"; element.size = "20"; document.getElementsByName("talep_form")[0].appendChild(element); } } </script> </head> <body> <form name="talep_form"> <?php //echo ulkeler(); // echo " <select name='ulkeler' id='ulkeler' onchange='bul()'>"; $sql=mysql_query("select * from ulke"); while ($row=mysql_fetch_array($sql)) { $ulke_adi=$row['ulkeadi']; $id=$row['ulkeID']; echo "<option value=$id>$ulke_adi</option>"; } echo "</select>"; echo "<br>"; // $sql_sehir="select * from sehir"; $res_sehir = mysql_query($sql_sehir); $result_sehir = mysql_query($sql_sehir); echo "<select name='sehir1' id='sehir1'>"; while ($row=mysql_fetch_array($res_sehir)) { $sehir_adi=$row['sehiradi']; $id=$row['sehirID']; echo "<option value=$id>$sehir_adi</option>"; } echo "</select>"; ?> <?php function ulkeler() { echo " <select name='ulkeler' id='ulkeler' onchange='bul()'>"; $sql=mysql_query("select * from ulke"); while ($row=mysql_fetch_array($sql)) { $ulke_adi=$row['ulkeadi']; $id=$row['ulkeID']; echo "<option value=$id>$ulke_adi</option>"; } echo "</select>"; echo "<br>"; } function sehirler() { $sql_sehir="select * from sehir"; $res_sehir = mysql_query($sql_sehir); $result_sehir = mysql_query($sql_sehir); echo "<select name='sehir1' id='sehir1'>"; while ($row=mysql_fetch_array($res_sehir)) { $sehir_adi=$row['sehiradi']; $id=$row['sehirID']; echo "<option value=$id>$sehir_adi</option>"; } echo "</select>"; } function text_ekle() { echo "<input type='text' name='text_ekle' id='text_ekle' size='20'>"; } ?> </form> </body> </html>
  2. hello my friends i can not control checkbox can you help me please my html and php code belov i want to send checbox stuation and textbox value save_rent.php page but i can not please help me thanks the my indexyz.html code <html> <body bgcolor="Teal"/> <center><h1>ALL CD/DVD FOR RENT</h1></center> <img src="film/islm2.JPG"/> <input type="checkbox" name="cd1"><b> amount....:<input type="text" name="cd1amount"/> <br> <form action="save_rent.php" method="POST"> <br><center><input type="submit" name="rent" value="payment all checked"> <input type="submit" name="return" value="return main page"></center> </form> </body> </html> ************* my save_rent.php page code: <?php session_start(); include('configproject.php'); if ($_POST['rent']) { $checkbox1=$_POST['cd1']; if ($checkbox1==true){ echo "ok"; } } ?>
  3. hello my friends the below code i can not see textbox why can you help me please i can see barcode but can not see text box; my code; <?php session_start(); include("dbconfig.php"); $code =$_SESSION['ran_barcode']; //echo "$code"; if (!$_SESSION['loggedIn']) { header("location:login.php"); die (); } else { function UPCAbarcode($code) { $lw = 2; $hi = 100; $Lencode = array('0001101','0011001','0010011','0111101','0100011', '0110001','0101111','0111011','0110111','0001011'); $Rencode = array('1110010','1100110','1101100','1000010','1011100', '1001110','1010000','1000100','1001000','1110100'); $ends = '101'; $center = '01010'; /* UPC-A Must be 11 digits, we compute the checksum. */ if ( strlen($code) != 11 ) { die("UPC-A Must be 11 digits."); } /* Compute the EAN-13 Checksum digit */ $ncode = '0'.$code; $even = 0; $odd = 0; for ($x=0;$x<11;$x++) { if ($x % 2) { $odd += $ncode[$x]; } else { $even += $ncode[$x]; } } $code.=(10 - (($odd * 3 + $even) % 10)) % 10; /* Create the bar encoding using a binary string */ $bars=$ends; $bars.=$Lencode[$code[0]]; for($x=1;$x<6;$x++) { $bars.=$Lencode[$code[$x]]; } $bars.=$center; for($x=6;$x<12;$x++) { $bars.=$Rencode[$code[$x]]; } $bars.=$ends; /* Generate the Barcode Image */ $img = ImageCreate($lw*95+30,$hi+30); $fg = ImageColorAllocate($img, 0, 0, 0); $bg = ImageColorAllocate($img, 255, 255, 255); ImageFilledRectangle($img, 0, 0, $lw*95+30, $hi+30, $bg); $shift=10; for ($x=0;$x<strlen($bars);$x++) { if (($x<10) || ($x>=45 && $x<50) || ($x >=85)) { $sh=10; } else { $sh=0; } if ($bars[$x] == '1') { $color = $fg; } else { $color = $bg; } ImageFilledRectangle($img, ($x*$lw)+15,5,($x+1)*$lw+14,$hi+5+$sh,$color); } /* Add the Human Readable Label */ ImageString($img,4,5,$hi-5,$code[0],$fg); for ($x=0;$x<5;$x++) { ImageString($img,5,$lw*(13+$x*6)+15,$hi+5,$code[$x+1],$fg); ImageString($img,5,$lw*(53+$x*6)+15,$hi+5,$code[$x+6],$fg); } ImageString($img,4,$lw*95+17,$hi-5,$code[11],$fg); /* Output the Header and Content. */ header("Content-Type: image/png"); ImagePNG($img); } UPCAbarcode($code); } ?> <html> <body> <input type="text" name="hello" value="hello"> </body> </html>>
  4. hello my friends the below code i can not see textbox why can you help me please i can see barcode but can not see text box; my code; <?php session_start(); include("dbconfig.php"); $code =$_SESSION['ran_barcode']; //echo "$code"; if (!$_SESSION['loggedIn']) { header("location:login.php"); die (); } else { function UPCAbarcode($code) { $lw = 2; $hi = 100; $Lencode = array('0001101','0011001','0010011','0111101','0100011', '0110001','0101111','0111011','0110111','0001011'); $Rencode = array('1110010','1100110','1101100','1000010','1011100', '1001110','1010000','1000100','1001000','1110100'); $ends = '101'; $center = '01010'; /* UPC-A Must be 11 digits, we compute the checksum. */ if ( strlen($code) != 11 ) { die("UPC-A Must be 11 digits."); } /* Compute the EAN-13 Checksum digit */ $ncode = '0'.$code; $even = 0; $odd = 0; for ($x=0;$x<11;$x++) { if ($x % 2) { $odd += $ncode[$x]; } else { $even += $ncode[$x]; } } $code.=(10 - (($odd * 3 + $even) % 10)) % 10; /* Create the bar encoding using a binary string */ $bars=$ends; $bars.=$Lencode[$code[0]]; for($x=1;$x<6;$x++) { $bars.=$Lencode[$code[$x]]; } $bars.=$center; for($x=6;$x<12;$x++) { $bars.=$Rencode[$code[$x]]; } $bars.=$ends; /* Generate the Barcode Image */ $img = ImageCreate($lw*95+30,$hi+30); $fg = ImageColorAllocate($img, 0, 0, 0); $bg = ImageColorAllocate($img, 255, 255, 255); ImageFilledRectangle($img, 0, 0, $lw*95+30, $hi+30, $bg); $shift=10; for ($x=0;$x<strlen($bars);$x++) { if (($x<10) || ($x>=45 && $x<50) || ($x >=85)) { $sh=10; } else { $sh=0; } if ($bars[$x] == '1') { $color = $fg; } else { $color = $bg; } ImageFilledRectangle($img, ($x*$lw)+15,5,($x+1)*$lw+14,$hi+5+$sh,$color); } /* Add the Human Readable Label */ ImageString($img,4,5,$hi-5,$code[0],$fg); for ($x=0;$x<5;$x++) { ImageString($img,5,$lw*(13+$x*6)+15,$hi+5,$code[$x+1],$fg); ImageString($img,5,$lw*(53+$x*6)+15,$hi+5,$code[$x+6],$fg); } ImageString($img,4,$lw*95+17,$hi-5,$code[11],$fg); /* Output the Header and Content. */ header("Content-Type: image/png"); ImagePNG($img); } UPCAbarcode($code); } ?> <html> <body> <input type="text" name="hello" value="hello"> </body> </html>>
  5. hello my friends i can not work below code i want to see textbox and my barcode but i saw text box i can not barcode why can you help me please my code; <html> <body> <input type="text" name="hello" value="hello"> </body> </html>> <?php session_start(); include("dbconfig.php"); $code =$_SESSION['ran_barcode']; //echo "$code"; if (!$_SESSION['loggedIn']) { header("location:login.php"); die (); } else { function UPCAbarcode($code) { $lw = 2; $hi = 100; $Lencode = array('0001101','0011001','0010011','0111101','0100011', '0110001','0101111','0111011','0110111','0001011'); $Rencode = array('1110010','1100110','1101100','1000010','1011100', '1001110','1010000','1000100','1001000','1110100'); $ends = '101'; $center = '01010'; /* UPC-A Must be 11 digits, we compute the checksum. */ if ( strlen($code) != 11 ) { die("UPC-A Must be 11 digits."); } /* Compute the EAN-13 Checksum digit */ $ncode = '0'.$code; $even = 0; $odd = 0; for ($x=0;$x<11;$x++) { if ($x % 2) { $odd += $ncode[$x]; } else { $even += $ncode[$x]; } } $code.=(10 - (($odd * 3 + $even) % 10)) % 10; /* Create the bar encoding using a binary string */ $bars=$ends; $bars.=$Lencode[$code[0]]; for($x=1;$x<6;$x++) { $bars.=$Lencode[$code[$x]]; } $bars.=$center; for($x=6;$x<12;$x++) { $bars.=$Rencode[$code[$x]]; } $bars.=$ends; /* Generate the Barcode Image */ $img = ImageCreate($lw*95+30,$hi+30); $fg = ImageColorAllocate($img, 0, 0, 0); $bg = ImageColorAllocate($img, 255, 255, 255); ImageFilledRectangle($img, 0, 0, $lw*95+30, $hi+30, $bg); $shift=10; for ($x=0;$x<strlen($bars);$x++) { if (($x<10) || ($x>=45 && $x<50) || ($x >=85)) { $sh=10; } else { $sh=0; } if ($bars[$x] == '1') { $color = $fg; } else { $color = $bg; } ImageFilledRectangle($img, ($x*$lw)+15,5,($x+1)*$lw+14,$hi+5+$sh,$color); } /* Add the Human Readable Label */ ImageString($img,4,5,$hi-5,$code[0],$fg); for ($x=0;$x<5;$x++) { ImageString($img,5,$lw*(13+$x*6)+15,$hi+5,$code[$x+1],$fg); ImageString($img,5,$lw*(53+$x*6)+15,$hi+5,$code[$x+6],$fg); } ImageString($img,4,$lw*95+17,$hi-5,$code[11],$fg); /* Output the Header and Content. */ header("Content-Type: image/png"); ImagePNG($img); } UPCAbarcode($code); } ?> error: Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\xampp\htdocs\root\root\termproject\welcome.php:7) in C:\xampp\htdocs
  6. thanks for your help solved my problem
  7. hello i want to take only one value the my database table but i can not my code $sql="SELECT market_id FROM cashier WHERE (cashier_name='$myusername' and cashier_id='$mypassword')"; $result=mysql_query($sql); echo "$result"; how can i have " market_id" thanks
  8. hello i want to take only one value the my database table but i can not my code $sql="SELECT market_id FROM cashier WHERE (cashier_name='$myusername' and cashier_id='$mypassword')"; $result=mysql_query($sql); echo "$result"; how can i have " market_id" thanks
  9. my code below but it dosn't work table name random column name r I want to control do-while but program not working thanks // do { $c1=rand(100000,999999); $c2=rand(10000,99999); $code=$c1."".$c2; $result1=" SELECT r FROM random where r='$code' "; }while ($result1!=$code); //
  10. I must write barcode reader in php but I can not write please help me I need barcode reader code in php I have not any idea this topic
×
×
  • 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.