Jump to content

gongpex

Members
  • Content count

    331
  • Joined

  • Last visited

  • Days Won

    4

gongpex last won the day on November 10 2012

gongpex had the most liked content!

Community Reputation

36 Excellent

About gongpex

  • Rank
    Member

Profile Information

  1. PHP ajax able to response on PC but not in mobile

    Yes, I didn't see alert on android device entirely .This why I asked you to test my code via smartphone (android device). I had debug (inspect element) it via network xhr in PC, everything were fine, Q : do you know how to debug on android device? please help Thanks
  2. PHP ajax able to response on PC but not in mobile

    @justsomeguy Hello thanks for reply, Well, in PC it would be display alert, but in mobile alert won't displayed. if you leave both of forms blank or either, it will shown alert with message "error", but if you fill both (whatever) it will shown "correct". My actual problem / block is only why it didn't work on android mobile browser. please help Thanks
  3. PHP ajax able to response on PC but not in mobile

    @justsomeguy Thanks for reply before, here the rest of code : <!DOCTYPE HTML> <head> <title>Form Test</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> <?php include('inc/link.php');?> <script src="<?php echo base_url('assets/admin/js/jquery-1.10.2.js');?>"></script> <style> body{ font-family:arial; font-size:13px; } .admin_panel { background-color:#B70531; width:auto; color:#FFF; text-align:center; padding:10px 0px; } .f_wrapper {min-width:270px; width:25%; margin:10% auto; padding:5px 5px 0px 5px;border:1px solid #C9C9C9;background:white} .f_col {padding:3px;float:left;width:40%} .f_col_w {width:auto; margin:0px; padding:0px 2px 0px 50%;clear:left;} .number, .number p {color:#E4292F;} .inbox{ width : 135%; height: 30px; } @media (max-width: 1242px){ body{ font-size:11px; } } </style> </head> <body> <form id="fm" role="form"> <div class="f_wrapper"> <div align="center" class="number warn"><!-- WARN --></div> <div align="center" class="number notify"><!-- WARN --></div> <div class="admin_panel">Backoffice Template Media</div> <div>&nbsp;</div> <div class="f_col">Admin Username</div><div class="f_col"><input name="l_username" type="text" class="inbox form-control"></div> <div class="f_col_w"><span class="number user"></span></div> <div class="f_col">Password</div><div class="f_col"><input name="l_password" type="password" class="inbox form-control"></div> <div class="f_col_w"><span class="number pass"></span></div> <div class="f_col">&nbsp;</div><div class="f_col"><button class="btn btn-default loading" id="signin">SignIn</button></div> <div class="f_col_w" style="height:10px;">&nbsp;</div> </div> </form> </body> <script> $(document).ready(function() { test_login(); }); function test_login(){ $("#fm").on('submit',function(e){ var formData = $(this).serialize(); $(".loading").html('<div class="loader"></div>'); $.ajax({ type : "POST", url : "<?php echo base_url('index.php/test/signin');?>", data : formData, dataType : "json" }).done(function(response){ $(".loading").html(''); if((response.success) == false){ alert('error'); } else { alert('correct'); } $(".loading").html('SignIn'); } ) e.preventDefault(); }); }; </script> <!-- BOOTSTRAP SCRIPTS --> <script src="<?php echo base_url('assets/admin/js/bootstrap.min.js');?>"></script> <!-- METISMENU SCRIPTS --> <script src="<?php echo base_url('assets/admin/js/jquery.metisMenu.js');?>"></script> <!-- CUSTOM SCRIPTS --> <script src="<?php echo base_url('assets/admin/js/custom.js');?>"></script> <script src="<?php echo base_url('assets/admin/js/mix.js');?>"></script> <!-- DATA TABLES --> <script src="<?php echo base_url('assets/admin/js/dataTables/jquery.dataTables.js');?>"></script> <script src="<?php echo base_url('assets/admin/js/dataTables/dataTables.bootstrap.js');?>"></script> <!-- LIGHTBOX --> <script src="<?php echo base_url('assets/js/lightbox/jquery.popupoverlay.js');?>"></script> </html> Please help me Thanks
  4. Hello everyone, I did upload my piece of cake code here : ajaxsite When I opened and run, this code worked well on PC. But when I opened it on my smartphone it didn't give responds entirely. Here my code : Controller Test.php public function index() { $this->load->view('form-test'); } public function signin() { header('Content-Type: application/json'); $l_username = $this->input->post('l_username'); $l_password = $this->input->post('l_password'); if(empty($l_username) || empty($l_password)){ $data['success'] = false; } else { $data['success'] = true; } echo json_encode($data); exit; } and this form-test.php : <body> <form id="fm" role="form"> <div class="f_wrapper"> <div align="center" class="number warn"><!-- WARN --></div> <div align="center" class="number notify"><!-- WARN --></div> <div class="admin_panel">Backoffice Template Media</div> <div>&nbsp;</div> <div class="f_col">Admin Username</div><div class="f_col"><input name="l_username" type="text" class="inbox form-control"></div> <div class="f_col_w"><span class="number user"></span></div> <div class="f_col">Password</div><div class="f_col"><input name="l_password" type="password" class="inbox form-control"></div> <div class="f_col_w"><span class="number pass"></span></div> <div class="f_col">&nbsp;</div><div class="f_col"><button class="btn btn-default loading" id="signin">SignIn</button></div> <div class="f_col_w" style="height:10px;">&nbsp;</div> </div> </form> </body> <script> $(document).ready(function() { test_login(); }); function test_login(){ $("#fm").on('submit',function(e){ var formData = $(this).serialize(); $(".loading").html('<div class="loader"></div>'); $.ajax({ type : "POST", url : "<?php echo base_url('index.php/test/signin');?>", data : formData, dataType : "json" }).done(function(response){ $(".loading").html(''); if((response.success) == false){ alert('error'); } else { alert('correct'); } $(".loading").html('SignIn'); } ) e.preventDefault(); }); }; </script> if you want to try these code please use smartphone. I did test this code on LG K8 with chrome browser. Q : Is there any errors of my code? Note I create my application on Codeigniter 3 framework, please help me Thanks
  5. Unable to install laravel on shared hosting

    Hello, thanks for reply, if so, can you recommend me another php framework that powerful maybe. I really appreciate it Thanks.
  6. Unable to install laravel on shared hosting

    Hello, thanks for your reply, according on your links I had tried to change app key on my local computer using : php artisan generate:key on command prompt, and I had reupload used it but it's unsuccessful... btw, because I used free hosting, then they didn't gave me access using SSH (secure shell) so I can't run composer. please help me here, I attach my .env file Thanks .env
  7. Hello everyone, I had tried number of times to install laravel on my shared hosting , my hosting is byethost, but it's unsuccessful the result always error http 500 . please open my site : http://testtemplatemedia.byethost12.com/public What I tried are : check php extension on my server hosting, all had set correctly change folder permission from 755 to 777 on folder 'storage' recursively check php version, currently I used laravel 5.25 and my php version on hosting is php 5.6.0 If you need my error log please check my attachment Please help me Thanks laravel.log
  8. HACKED

    Hello everyone, Today I'm very shocked because when I woke from my slept, my computer had turned on already, this forum had opened on my browser.......... This thread -> how to escape from unwanted marriage I've never made before, I'm sure somebody use my computer when I was slept last night....... And I never used 'Hi guys' as greetings, moreover 'hihihi'...... and he/she (i don't know) maybe use bookmark to open this forum, and I usually store my username and password on browser so that I can log into this forum easily ....... This is really embarrassing .......................................................................... Honestly I must admit I love off topic, but since there is rule on this forum that off topic is prohibit, and every time I ask off topic nobody answer me , then I never ask about off topic anymore. This is not off topic but 'Fool Topic' I'm really ashamed with this->how to escape from unwanted marriage thread........ And I wonder why when I made off topic question very seldom someone answer / reply on my off topic..... but somebody who used my computer and post this 'Fool Topic' got response so many....Maybe I'm unlucky person on this forum........ That's all only can I say, I don't know what I must say................. E : I hope all of you will ignore or delete this->how to escape from unwanted marriage thread............................
  9. Hi guys hihihi Please tell me how to escape from unwanted marriage on wedding day maybe there is someone can give me some advice how to escape from unwanted marriage thx HIHIHIIHI
  10. confuse with java bridge tutorial

    No I tried it on apache server Only that the message nothing anymore... please help Thanks
  11. confuse with java bridge tutorial

    Hello everyone, Long time no see, I hope you all are fine, Today I've tried to use javabridge, according tutorial on : http://php-java-bridge.sourceforge.net/pjb/desktop-apps.php I rather confused with this tutorial because when I tried to run the example that I got when downloaded javabridge.war it won't run. For example bench.php : #!/usr/bin/php <?php //define ("JAVA_DEBUG", true); require_once ("java/Java.inc"); $here = getcwd(); $java_output = "workbook_java.xls"; $php_output = "workbook_php.xls"; ini_set("max_execution_time", 0); $sys = java("java.lang.System"); // fetch classes and compile them to native code. // use local poi.jar, if installed try { java_require("$here/exceltest.jar;$here/../../unsupported/poi.jar"); } catch (JavaException $e) { java_require("$here/exceltest.jar;http://php-java-bridge.sf.net/poi.jar"); } $excel = new java("ExcelTest"); $excel->createWorkbook("/dev/null", 1, 1); // test starts $sys->gc(); $start = java_values($sys->currentTimeMillis()); $excel = new java("ExcelTest"); $excel->createWorkbook("$here/$java_output", 200, 200); $sys->gc(); $t_java = java_values($sys->currentTimeMillis()) - $start; include("$here/excel_antitest.php"); $sys->gc(); $start = java_values($sys->currentTimeMillis()); createWorkbook("$here/$php_output", 200, 200); $sys->gc(); $t_php = java_values($sys->currentTimeMillis()) - $start; echo "$java_output\t: $t_java ms.\n"; echo "$php_output\t: $t_php ms.\t(" . $t_php/$t_java .")\n"; /* Sample results on a 1.4GHZ i686, kernel 2.6.8 -------------------------------------------------- PHP/Java Bridge Version 1.0.8: pure java mix PHP/Java pure java mix PHP/Java interpreted (-Xint) interpreted (-Xint) compiled compiled jdk 1.4: 13367 ms 42919 ms 2325 ms 22276 ms 1.5: 18342 ms 42048 ms 2227 ms 21008 ms -------------------------------------------------- PHP/Java Bridge Version 2.0.7: jdk 1.4: 13929 ms 39723 ms 2349 ms 9232 ms -------------------------------------------------- PHP/Java Bridge Version 4.3.3: jdk 1.6: - ms - ms 2120 ms 7655 ms */ ?> when I open on address bar : http://127.0.0.1/javabridge/bench/bench.php it's shown : Warning: java_require() not supported anymore. Please use and if I changed "java_require" it became : try { use $here/exceltest.jar;"$here/../../unsupported/poi.jar"; } catch (JavaException $e) { use $here/exceltest.jar;"http://php-java-bridge.sf.net/poi.jar"; } Parse error: syntax error, unexpected 'use' (T_USE) in C:\Apache24\htdocs\javabridge\bench\bench.php on line 17 I don't know what I must do, please help me Thanks
  12. SQL export whole table

    Hello everyone, I look on google if we want to backup up data from mysql we run code like this : <?php $dbhost = 'localhost'; $dbuser = 'root'; $dbpass = 'root'; $conn = mysql_connect($dbhost, $dbuser, $dbpass); if(! $conn ) { die('Could not connect: ' . mysql_error()); } $table_name = "kol1"; $backup_file = "F:/test.sql"; $sql = "SELECT * INTO OUTFILE '$backup_file' FROM $table_name"; mysql_select_db('test'); $retval = mysql_query( $sql, $conn ); if(! $retval ) { die('Could not take data backup: ' . mysql_error()); } echo "Backedup data successfully\n"; mysql_close($conn); ?> This code works, but only backup one table (kol1), Q : Is there any solution to backup all table from database? please help me Thanks
  13. Hello , Thanks for reply I appreciate it
  14. Hello everyone, I had tried to generate txt file from php foreach loop, it's work, but the result is not table formatted like this : Q : Is there php plugins or something ,so that the result shown as my expectation like this : this is my code : $output[] = ''."\n".''; $output[] = ' No '.' Name Product '.' Total '."\n".''; foreach($query->result() as $row){ $results = $row->id_product; $product = $this->db->query("select product_name from master_product WHERE product_id='".$results."'"); $product_name = $product->row()->product_name; $output[] = ' '.$no.str_repeat(" ",20).''. $product_name.str_repeat(" ",20).''.$row->quantity.' '.$row->scale."\n".''; $no++; } file_put_contents(APPPATH."txt/test.txt", $output); please someone help me Thanks
  15. Jquery data table post data from variable

    hmm ok, thanks for answer before, my expectation actually : to make select option that I've made, work when it changed. Here is my screen shot : If I used code on above the result is : "undefined property : start" and etc please help me Thanks
×