22 Posted Topics
Re: publish just the form and a dump of $_POST ![]() | |
Re: first checks db if is really updated second post code that show up page | |
Re: Simply include your html page in a .php script <?php if(isset($_SESSION['login']) require_once("pageA.html"); else require_once(pageB.html); ?> | |
Re: window.parent.reload(true) | |
Re: I uggest you to look at this example [Click Here](http://code.tutsplus.com/tutorials/rapid-application-prototyping-in-php-using-a-micro-framework--net-21638) it is a complete php app written in oop logic with mvc pattern it helped me to understand how to organize php code in oop logic. for interaction with database look at idiorm code. hth | |
Re: I think you are very lazy just put the line in visual studio and you see the string is not properly formatted double quotes should be escaped | |
I have to execute a very long time script in php, during the execution the browser still waiting. There is any way to "tell" the browser to stop waiting as the page was completed ? but obviously the sript must continue | |
Re: your script is executed when server receives data via post at the moment you can't do anything on client side you have 2 choices `1. validate data before submit using jquery or js see docs for .onsubmit event` 2. if there any error you can redisplay the page showing the … | |
Re: there can be only rone adio selected in a group you group them assigning the same name attribute in POST you will receives the value of the selected radio | |
Re: ready done! <select id="select_one" onchange="selection_changed();"> <option value="1">one</option> <option value="2">two</option> </select> <select id="select_two" onchange="selection_changed();"> <option value="1">one</option> <option value="2">two</option> </select> selection_changed(){ if( $("select_one").val()==$("select_two").val(){ window.location="http://example.com"; } } | |
Re: $("[checkbox]").each(){ $(this) //this is your checkbos you can elaborate val and attributes send to the server via $.post(...) } | |
Re: remember the view is the output sent to the browser suppose you have an array of records you can prepare a string for your options like this $options=""; foreach( $records as $k=>$v){ $options.="<option value='$v'>$k</option>\n" } or put the cycle directly in the view (not a best practice) | |
Re: It is javascript programming with jquery $("#textboxID").val( $("#selectID").val()) | |
Re: imho modern php coding follows these best practices: strong application of mvc pattern with url rewriting a router business logic in classes absolutely no html output from php in php prepare all data to pass to view(html) can use a template engine **must** use an orm if you work in … | |
Re: require parse the php code and **add** output not replace if you follow the flow of your code it may be right. | |
Re: you should check if the rendered page is as you expect to be press control-u in browser and look if the source is right open console and also verify if there are javascript|css error when you get the origin of the error post it | |
Re: basic lib [Click Here](http://phpmailer.codeworxtech.com/) basic example $mail = new PHPMailer(); $doc = $text;//some text here $mail->AddStringAttachment($doc, 'doc.txt', 'base64', 'application/xxx');//xxx myme type $mail->Send(); | |
Re: if you need to further process data client side you can generate an js array which contains json object `$js="list = new Array();\n"; $index=0; while ($row)`{ $js.="list[".$index."]=".json_encode($row).";\n"; } //in the page just print $js | |
Re: if you don't want to use dom api that is the best choice your content is a string parse it to find the css href and then load it again with file_get_contents ![]() | |
Re: my best choice is [Click Here](http://simplehtmldom.sourceforge.net/) linear and well document also works well. | |
Re: obviously you can't integrate user's bank account into your system I'll never let you get in my bank account. your best option is integrate pyapal users then can pay by 1.credit/debit cards 2.paypal account 3.wire transfer from their bank | |
Re: this can be a logic $cYear='2015';//set current year //cycle over month for ($i=1; $i <=12 ; $i++) { //make query for the month $sql = "SELECT * FROM ".$SETTINGS["data_table"]." WHERE `event_date` LIKE '".$cYear."-".$i."-%'"; $result_eventsOfMonth = mysql_query ($sql, $connection ) or die ('request "Could not execute SQL query" '.$sql); if (mysql_num_rows($result_eventsOfMonth)>0) … |
The End.