PHP - Gps Devices And Programming
Alright.. I guess to start this off I am looking to sometime in the near future start building a web based or browser based application that I want to build a part of the interface to be a gps module. this will be for a self hosted application likely on tablets or laptops where it will use the data for tracking information amongst other things. Any way most of the application is being handled in PHP, mySQL, jQuery. So with that my question is, is there any way to build a gps application with that as the core languages used. If it is possible, whats the best gps unit I can use? remember im not nessisarily looking for a fancy gps unit to do this with.. just a transmitter/reciever is fine so long as I can build software of my own around it, also is it actually possible to do this with something like php/jquery? or is this something I would have to go the route of maybe java to handle the hardware transactions of which I can tie php/jquery into that..
Similar TutorialsHi everybody
I want to put this code (or something like that) in my index.php to redirect the iPhones etc.
But where do I have to put it in? In the head or body?? And how can I call this function?
Thanks a lot for helping a beginner!
function ismobile(){ $useragent = $_SERVER[‘HTTP_USER_AGENT’]; // Standard vendor-model/version user agents if(preg_match(‘/^((ACER¦Alcatel¦AUDIOVOX¦BlackBerry¦CDM¦Ericsson¦LG\b¦LGE¦Motorola¦MOT¦NEC¦Nokia¦Panasonic¦QCI¦SAGEM¦SAMSUNG¦SEC¦Sanyo¦Sendo¦SHARP¦SIE¦SonyEricsson¦Telit¦Telit_mobile_Terminals¦TSM)[- ]?([^\/\s\_]+))(\/(\S+))?/’, $useragent)){ return true; }else{ return false; } } This topic has been moved to HTML Help. http://www.phpfreaks.com/forums/index.php?topic=355495.0 I just can not get my head around this one at all. I have copied exactly the same code from my own template site and added in new content to the head, main body and footer and no matter what I change I can not get the footer text to show the same on a mobile and a pc like my site I took the code from does. The size of the text just goes large on mobiles, yet the same code is used apart from the slight formatting differences, it should still show the text the same. I opted to copied the resulting source code from the browser for both my site and the new site i am doing and stripped out the main content and header and left just the footer and the main body container html for both and my own site show perfectly on all but still the new site is not playing ball. Below is the code for the new site. Can anyone spot anything that I may have missed that is causing the text to show differently (larger) in the footer on mobile devices. New site <!DOCTYPE html> <html lang="en"> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <meta name="keywords" content=""> <meta name="description" content=""> <style> body { font-family: Verdana, Arial, Helvetica, sans-serif; color: #464646; text-decoration: none; background-color: #8C8C8C; margin: 0em; padding: 1.125em; } a, a:visited { color: #164365; text-decoration: underline; } a:hover { color: #6F6F6F; text-decoration: none; } .clear { clear: both; } #main { width: 46.188em; margin:auto; } #main-inner { padding: 0em 1.063em 0.313em 1.063em; border: 0em solid red; min-height: 12.5em; background-color: #FFFFFF; } #footer { margin: 0 auto; clear: both; /*font-size: 0.74em;*/ color: #FFFFFF; text-align: center; width: 46.188em; border: 0.1em solid #ddd; } /* 727 */ #footer a:link, #footer a:visited { color: #FFFFFF; text-decoration: none; } #footer a:hover { color: #FFFFFF; text-decoration: underline; } </style> <meta name="ROBOTS" content="INDEX, FOLLOW"> <link rel="icon" href="favicon.ico" type="image/x-icon"> </head> <body> <div id="main"> <div id="main-inner"> </div> <div class="clear"></div> </div> <div id="footer"> <div style="margin: 0em; text-align: center; font-size: 9pt; border: 0px solid #000;"> <a href="#">clickable link one</a> | <a href="#">clickable link two</a> | <a href="#">clickable link three</a> | <a href="#">clickable link four</a> | <a href="#">clickable link five</a> |© 2014 my shop ™ </div> </div> </body> </html> and just to show what my original code does.. <!DOCTYPE html> <html lang="en"> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <meta name="keywords" content=""> <meta name="description" content=""> <style> body { font-family: Verdana, Arial, Helvetica, sans-serif; color: #464646; text-decoration: none; background-color: #8C8C8C; margin: 0em; padding: 1.125em; } a, a:visited { color: #164365; text-decoration: underline; } a:hover { color: #6F6F6F; text-decoration: none; } .clear { clear: both; } #main { width: 46.188em; margin:auto; } #main-inner { padding: 0em 1.063em 0.313em 1.063em; border: 0em solid red; min-height: 12.5em; background-color: #FFFFFF; } #footer { margin: 0em auto; clear: both; color:#FFFFFF; text-align: center; padding: 0em 0em 0em 0em; width: 46.188em; border: 0em dashed #ddd; } #footer a:link, #footer a:visited { color: #FFFFFF; text-decoration: none; } #footer a:hover { color: #FFFFFF; text-decoration: underline; } </style> <meta name="ROBOTS" content="INDEX, FOLLOW"> </head> <body> <div id="main"> <div id="main-inner"> </div> <div class="clear"></div> </div> <div id="footer"> <div style="float: left; width: 6em; border: 0em solid #000;"> </div> <div style="float: left; width: 130px; font-size: 7pt; border: 0px solid #000;"> </div> <div style="float: left; width: 275px; font-size: 8pt; border: 0px solid #000;"> <div style="float: left; width: 200px; border: 0px solid #000;"> © <abbr title="">My company</abbr> </div> <div style="float: left; width: 20px; border: 0px solid #000;"> <a href="http://www.realistichostings.com/sitemap.xml" target="_blank" style="text-decoration: none;">sitemap</a> </div> <div class="clear"></div> designed & hosted by <abbr title="">More footer text</abbr><br>images are copyright of their respective owners </div> </div> </body> </html> Hello masters. I wish to share with you a problem that is killing me in this dais!! I have a website in xhtml, with some php form. This website is made for Japanese customers (all in Japanese) and that's the big trouble. The language encoding of the php form is really killing me. I tried several solutions, but I couldn't sort this problem. So I was wondering if you guis could help me... This is how it should work: customers fill up the form in Japanese. The php script send the deta to my mail address and to the customer one. Simply and plan. No image, just text ... easy. I tested it on my Japanese computer and it works great: I recive the mail, the customer recive the mail and all the field are ok and I can read all the Japanese charachters. The big troubles come out when I try to fill up the form with a Japanese mobile device: Both the customer and me recive a mail with weird characters. something like this: ..????i???.... and so on....damn, I can't understand why. The most weird thing is that it really works great on computer browser. But as this is a website for mobile devices I have no choice but to settle this. Here is part of the code I use for the form: <?php // I set the page encoding to EUC-JP and set the Japanese language mb_language("ja"); mb_internal_encoding("EUC-JP"); // Declare $ $EmailFrom = Trim(stripslashes($_POST['EmailFrom'])); $EmailTo = "orders@mobile-body-ex.com"; $Subject = "Body-ex Cellphone Order"; $Nome = Trim(stripslashes($_POST['Nome'])); $Cognome = Trim(stripslashes($_POST['Cognome'])); $Postal = Trim(stripslashes($_POST['Postal'])); $Address = Trim(stripslashes($_POST['Address'])); $Number = Trim(stripslashes($_POST['Number'])); .... // validation $validationOK=true; if (Trim($EmailFrom)=="") $validationOK=false; if (!$validationOK) { print "<meta http-equiv=\"refresh\" content=\"0;URL=error.xhtml\">"; exit; } // prepare email body text $Body = "モバイルサイトから注文受けました: Angel スリーラウンドペンダント AD-0011 Booking Form;"; $Body .= "名前: "; $Body .= $Nome; $Body .= "\n"; $Body .= "名前(フリガナ): "; $Body .= $Cognome; $Body .= "\n"; $Body .= "郵便番号: "; $Body .= $Postal; $Body .= "\n"; $Body .= "住所: "; ..... // send email $success = mb_send_mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>"); .....Follow the second mail directed to the customer email address. ps: モバ are Japanese characters... Both the html page with the form and the php page are set to EUC-JP (charset="euc-jp"). What should I do to make this work properly? I repeat that it actually works on the net if you use a computer browser (try to see at http://www.mobile-body-ex.com/ora1.html). But I couldn't find a way to make it works if you fill up the form trough a browser for mobile devices (Japanese). ......please, give me some hint Thank you everybody! As the title says, on any mobile device, display: none; does not work. It will work when the CSS file is cached, however, when you refresh the URL (in any browser this will request a new version of the file) it appears that it will ignore display: none; calls. I tested this on several emulators.
I read somewhere that using both display: none; and visibility: hidden; worked, but I have not seen results for this.
Has anyone come across this before, or know a fix/work-around?
hello, im trying to read the database and store values into an array list. when i run the script it says undefined variable prodcode, name, price in the function prod details. any help pliz. appreciate the help. thnaks! require("dbfunctions.inc.php"); $count; class Product { // The following are the attributes of the Product class, that is, var $prodcode = array(); var $name = array(); var $price = array(); /* CONSTRUCTOR Every class has at least one constructor method. We create an instance of a class using the class's constructor */ function AllProducts() { $qry = "Select ProdCode, Name, Price, Image from products"; //execute query $products = execute_query($qry); if (!$products) {die('query failed.'); } $i = 0; global $count; $count= mysql_num_rows($products); while ($line = mysql_fetch_array($products, MYSQL_ASSOC)) { $prodcode =array ($line['ProdCode']); //$name[$i] = $line['Name']; //$desc[$i] = $line['Desc']; //$price[$i] = $line['Price']; //$category[$i] = $line['Category']; $i++; } } // Method to print the Shopping Cart details to the screen function ProdDetails() { global $count; echo $count; echo $count; for ($i = 0; $i <= $count; $i++) { //echo "<tr><td>"; echo "<br>Product Code: <a href=DisplayProduct.php?prodcode=" . $prodcode[$i]. ">" .$prodcode[$i]. "</a>"."<br>"; echo "Product Name: ".$name[$i]." <br>". "Price: FJD$ " .$price[$i]."<br>"; } } // Method to print the Shopping Cart details to the screen function getProdCode() { echo "Product Code: " . $this->prodcode . "<br>"; } } // END OF CLASS Its like an elusive goal of mine. To be able to write big pieces of code that are reusable in multiple projects.
For example: Lets say we are coding a simple 'Membership system'- login / signup etc.
How would for instance something like routing would be handled in this so that it remains modular. Reusable in multiple projects that may be using a different router for their projects.
Any guidance please ? Is there a book that shows how its done ?
Hii.... I simply want to know the answer of a simple question "Is it possible to do Window Programming in PHP?", like C++, .net, etc.....and if so then where I can find links for the tutorials..... Hi all, I am trying to create a socket that can read from and write to a client. This is my first attempt at it and the code in question is based more or less on a python script a friend sent me as well as some php tutorials google supplied. The problem is (and this seems to be a reoccurring one) when I run it from the command line Code: [Select] php -q server.php nothing visibly happens. Can anyone see what the problem might be? Code: [Select] <?php $host = "localhost"; $port = 50007; set_time_limit(0); // no timeout $socket = socket_create(AF_INET, SOCK_STREAM, 0) or die("Could not create socket\n"); // create $result = socket_bind($socket, $host, $port) or die("Could not bind to socket\n"); // bind $result = socket_listen($socket, 3) or die("Could not set up socket listener\n"); // listen echo "Waiting for connections...\n"; $contact = socket_accept($socket) or die("Could not accept incoming connection\n"); // accept $input = socket_read($contact, 1024) or die("Could not read input\n"); // read $input = trim($input); // clean $output = "Greetings, you have connected to a socket.\n"; socket_write($contact, $output, strlen ($output)) or die("Could not write output\n"); // return socket_close($contact); // close socket socket_close($socket); // close socket ?> I am adding a comments "wall" (similar to facebook or youtube) on my site, and here is the condition it's currently in: http://www.trancetrackonline.com/index.php I am not a very good programmer, but I just need to make a couple small changes to the script. I don't want to include "email" or "homepage" fields, since they are not relevant for me. Also, if possible (though the first thing is more important), I'd like to figure out how to make the advertisement at the bottom of the board ("...provided by gentlescript...") a little bit small, since right now it is very obtrusive. many thanks in advance to anyone who can figure this out!!!!!! The scripts are attached, but Here is the comments.tpl.html script: {call_module trigger="frontend_content_footer" data="$page_data"} <!-- Comment List Start --> <a name="c5t_comment"></a> <h2 class="c5t_headline">{$txt_comment_headline} ({$result_number})</h2> <div class="c5t_comment_list"> {foreach from=$comment_list item=item} <div class="c5t_comment_item_background"> <div class="c5t_comment_item"> <div class="c5t_comment_item_title">{$item.comment_title}</div> <div class="c5t_comment_item_text">{$item.frontend_text}</div> <div class="c5t_comment_item_details">#{$item.comment_number} - {if $item.comment_author_homepage != '' and $item.comment_author_homepage != 'http://'}<a href="{$item.comment_author_homepage}">{$item.comment_author_name}</a>{else}{$item.comment_author_name}{/if} - {$item.comment_date} - {$item.comment_time}</div> </div> </div> {/foreach} </div> <!-- Comment List End --> <!-- Pagination Form Start --> {if $comment_list and $display_pagination} <div class="c5t_frontend_pagination"> {if $browse_previous == 2} <form {$startpage.attributes}>{$startpage.hidden}{$startpage.start.html}</form> <form {$previouspage.attributes}>{$previouspage.hidden}{$previouspage.previous.html}</form> {else} <span>{$txt_start}</span> <span>{$txt_previous_page}</span> {/if} {if $browse_next == 2} <form {$nextpage.attributes}>{$nextpage.hidden}{$nextpage.next.html}</form> <form {$endpage.attributes}>{$endpage.hidden}{$endpage.end.html}</form> {else} <span>{$txt_next_page}</span> <span>{$txt_end}</span> {/if} </div> {/if} <!-- Pagination Form End --> <!-- Comment Form Start --> <a name="c5t_form"></a> <div class="c5t_comment_form_background"> <form {$form.attributes}> <table class="c5t_comment_form_table"> <tr> <td colspan="2" class="c5t_error_message"> {foreach from=$message item=item} <div class="c5t_error_message_item">{$item}</div> {/foreach} </td> </tr> {if $show_form == "yes"} <tr> <td class="c5t_comment_form_label"> {if $form.name.error} <span class="c5t_error_message">{$form.name.error}</span> {else} {$form.name.label} {/if} </td> </tr> <tr> <td class="c5t_comment_form_field"> {$form.name.html} </td> </tr> <tr> <td class="c5t_comment_form_label"> {if $form.email.error} <span class="c5t_error_message">{$form.email.error}</span> {else} {$form.email.label} {/if} </td> </tr> <tr> <td class="c5t_comment_form_field"> {$form.email.html} </td> </tr> <tr> <td class="c5t_comment_form_label">{$form.homepage.label}</td> </tr> <tr> <td class="c5t_comment_form_field"> {$form.homepage.html} </td> </tr> <tr> <td class="c5t_comment_form_label">{$form.title.label}</td> </tr> <tr> <td class="c5t_comment_form_field"> {$form.title.html} </td> </tr> <tr> <td class="c5t_comment_form_label"> {if $form.$comment_field_name.error} <span class="c5t_error_message">{$form.$comment_field_name.error}</span> {else} {$form.$comment_field_name.label} {/if} </td> </tr> <tr> <td> {call_module trigger="frontend_textarea" field=$comment_field_name} </td> </tr> <tr> <td class="c5t_comment_form_field"> {$form.$comment_field_name.html} </td> </tr> <tr> <td class="c5t_comment_form_field"> {call_module trigger="frontend_comment_form"} </td> </tr> <tr> <td class="c5t_comment_form_label"></td> </tr> <tr> <td class="c5t_comment_form_submit">{$form.save.html}{$form.hidden}</td> </tr> {/if} </table> </form> </div> <!-- Comment Form End --> and here is the layout.tpl.html script: <div id="c5t_body"> <div id="c5t_bodycontent"> <!-- Language selection (link list or dropdown menu) --> {include file='default/language.tpl.html'} {foreach from=$system_messages item=item} <div class="c5t_system"> <div class="c5t_index">{$item.title}</div> <div class="c5t_code"><br />{$item.message}</div> </div> {/foreach} {foreach from=$error_messages item=item} <div class="c5t_system"> <div class="c5t_index">{$item.title}</div> <div class="c5t_code"><br />{$item.message}</div> </div> {/foreach} {call_module trigger="frontend_page_header"} {include file=$detail_template} {call_module trigger="frontend_page_footer"} {foreach from=$debug_messages item=item} <div class="c5t_system"> <div class="c5t_index">{$item.title}</div> <div class="c5t_code"><br />{$item.message}</div> </div> {/foreach} </div> </div> I am at a crossroads. I want to have our website both redesigned graphically as well as need the backend code recoded, retooled, updated, tweaked, etc. I am not a programmer, but I can make decent graphics myself. However, with that said, the graphical redesign I want to give my site, would still involve coding to move objects around, something of which I am not capable of. The decision I face is which to do first? Do I do a graphical redesign first, so that the graphics and layout are already there so that when I want my programmer to add features, they are adding them where they are going to stay. Or do I do a code redesign, tweak where I am adding new features to existing code, and have code that is old rewritten for better function, but put it in spots that may not look as good or as pleasing to the eye, until the graphical design comes? Which is better as far as user experience? Which is going to be cheaper and more cost effective? On the one hand, if I do a graphical redesign first, then things should be in place for where I want new features to end up, and the site looks good, even if it lacks features and may feature open spots where somethings aren't appearing, simply because they haven't been coded yet. Also, I can tell the programmer right where I want the feature they're coding to appear, and once it's inserted, it's where it's going to stay. On the other hand, if I have the coding done first, then as the features are coded, I can have them put in approximate places where I want them, and the features will be coded, but may need to be moved later on to make it more appealing, or be made more visible by being moved. BUT, if the features are already coded, I will know what types of pages I need to have designed, and what all I need to have pages for. Is it cheaper to have a programmer come back and move the code around, or to have a design moved around so that the feature is where I want it to be? I know more/better features will bring more visitors to my site, but so can that initial first time you visit a webpage and the graphical design really looks appealing. It hasn't escaped me that you may need to know what condition the actual site is in that I'm talking about. If so, it's www.gamesforwork.com It lacks both features and a very Web 2.0 design with all the css and ajax bells and whistles. Can any programmers or graphical designers out there give me some ideas, on which direction I should take? I already have my ideas for features, I don't need ideas like that. I am more looking for if it's going to cost a lot more for me to do the graphics first, or the programming first. Thanks for any insight you may have on this. (If it makes any difference our recode would be php,mysql,css,ajax/javascript with quite a bit of database driven pages that organize and display the content the user is interested in) I`ve seen sites, such as ones using Drupal and other open source codes, where skin changes can be done at the click of a button and the site can look drastically different. I have one in place where it`s very basic for my users to select which skins they want but it`s so basic that just colour changes are made (such as text colour, background colour of content boxes, etc). And the code I`m is all custom code I`ve been doing myself. I downloaded Drupal in hopes of being able to look at it`s codes and see how they do things (it`s how I learn, by seeing codes). But unfortunately the way they write their codes, I don`t understand it at all. I probably only understand about 5% of what they have. I was even looking into how they do blocking but couldn`t get that either. Examples of what I`m looking for: Skin 1 may have the navigation menu on the top of the page Skin 2 may have the navigation menu on the left of the page and are just text links Skin 3 may have the navigation menu on the left of the page and are pictured tabs All of which may also have their own colour codes for texts and background changes and how content boxes are done, etc. How will I be able to write up codes to have my site`s skin change in a total fashion and in a way that I can work with where it`s simple and I can edit it at any time if I choose to (though it may not be needed)? This is probably less of a language-specific question and more one related to logic, but since it's written in PHP and it's been vexing me for a few hours now, I figured I'd take a shot asking about here! Simple problem I'm trying to figure out for a class; I have a simple string of characters in the form "111-AAA" (three digits, hyphen, three letters) and I'm supposed to increment the string in a particular order. I increment the digits first, and after they've passed 999, I reset them to 000, increment the right-most column on the letters' side, and start again. I assumed this would be pretty simple, but the code I've written executes with some fairly strange results. With the file posted below, eight iterations into the outermost for() loop ought to echo "119-AAA", but I get "129-AAA" instead. And that's just the beginning - I started off with a thousand iterations so I could see just how drastically this little issue snowballs down the line. I see what's happening: before the value in the column being incremented is reset to 0 or A, the next column to be changed jumps the gun and gets incremented early. But no matter where I stick the increment expression, the same thing happens. I'm sure the problem is right here under my very nose, but I'm completely missing it...could anyone possibly show me what I'm not seeing? <html> <title>Test</title> <body> <?php $oldString = "111-AAA"; echo "Below this line is the string to be modified:<p>"; echo $oldString; echo "<p>And below this line is the modified string:<p>"; $newString = array($oldString[2], $oldString[1], $oldString[0], $oldString[6], $oldString[5], $oldString[4]); for($i=0; $i<1000; $i++) { for ($count = 0; $count < 6; $count++) { $newString[$count]++; if (($newString[$count] > 9) && ($count < 3)) { $newString[$count] = 0; break; } if (($newString[$count] == 'AA') && ($count > 2)) { $newString[$count] = 'A'; break; } if (($newString[$count] != 'AA') && ($newString[$count] != 9)) { break; } } echo $newString[2] . $newString[1] . $newString[0] . '-' . $newString[5] . $newString[4] . $newString[3] . "<br>"; } ?> </body> </html> Okay... so I am loading some content into my page from the database... I know how to do this normally... but here is the sticking point... I want to load the content from one of 5 options (so there are multiple pages with 5 different options for body copy) depending on what the value of the cookie is... Here is what I tried, but it did not work: //Determin which page ID to use in our query ---------------------------------------------------------------------------------------------- if (!$_GET['pid']){ $pageid = '1'; } else { $pageid = $_GET['pid']; } //Query the Main Content and Titles for the proper page --------------------------------------------------------------------------------------------- $sqlCommand="SELECT process_mainContent_vers1, process_mainContent_vers2, process_mainContent_vers3, process_mainContent_vers4, process_mainContent_vers5, process_pagetitle FROM pages_process WHERE process_id='$pageid' LIMIT 1"; $query=mysqli_query($myConnection, $sqlCommand) or die (mysql_error()); $body = ''; $title = ''; while ($row = mysqli_fetch_array($query)) { if (isset($_COOKIE['career_status'])) { $carreerStatus = ($_COOKIE['career_status']); if ($carreerStatus=="Starting Residency/Graduating Medical School") $body = $row["process_mainContent_vers1"]; if ($carreerStatus=="Ending Residency/Starting Fellowship") $body = $row["process_mainContent_vers2"]; if ($carreerStatus=="Practicing Physician") $body = $row["process_mainContent_vers3"]; if ($carreerStatus=="Practicing Physician") $body = $row["process_mainContent_vers4"]; if ($carreerStatus=="Hospital/Practice Administrator") $body = $row["process_mainContent_vers5"]; } else { $carreerStatus = ($_SESSION['career_status']); if ($carreerStatus=="Starting Residency/Graduating Medical School") $body = $row["process_mainContent_vers1"]; if ($carreerStatus=="Ending Residency/Starting Fellowship") $body = $row["process_mainContent_vers2"]; if ($carreerStatus=="Practicing Physician") $body = $row["process_mainContent_vers3"]; if ($carreerStatus=="Practicing Physician") $body = $row["process_mainContent_vers4"]; if ($carreerStatus=="Hospital/Practice Administrator") $body = $row["process_mainContent_vers5"]; } $title = $row["process_pagetitle"]; } mysqli_free_result($query); //----------------------------------------------------------------------------------------------------------------------------------------- Hello guys,
I require a suggestion about how shall I proceed as when I am about to set a goal for my future in programming world, Just so that you could suggest me better, I urge you to please read about a little background history of mine. And please stay neutral in regards of language, dont say PHP because you are a PHP developer and dont say Java because you are a Java developer.
Thanks.
I stepped into programming when I was in school (below A-levels at 14, now I am 29) and I started to bunk school and went to internet cafe and would sit there reading sources of HTML pages in year 2000. I would observe their programming styles, I would learn about the tags they used and then search internet (it was IE6 then and Yahoo searching at its peak) so I could learn about it.
Years passed, and having my family related to medical professions, I took admission in Pharmacy in University and quit after 2 years and entered working class. My development slowed down but passion always stayed the same.
Now I am in Spain and working as a technician of mobile repairing with a company, but I still have this passion of programming and when I learn that etc etc friend of mine now is working with CISCO in Germany, now is working as a game developer in America, I become really sad. I could have been one of those. But the fact is that I am not. So I restarted again with development and started learning PHP on my work desk using online resources and tutorials and asking silly questions.
Nothing I could become but an obsolete language programmer with a mess.
Now when I havent been able to become someone, till now, I still have passion and I want to be somewhere.
-----------------------------
I am confused for some days now, shall I continue with PHP (apart from the fact that i am a MYSQL learner, haven't learned PDO or MYSQLi till now) or shall I step into Java learning, using the online resources ofCourse, but if I step into Java, It will be a fresh start and I will be able to organize it better on my way with guidance of professionals like you.
The Things confusing me: (as I am imagining in my mind)
PHP:
A great web development language being used on billions of website, have an extraodinary support, well documented, World is moving online, so future is e-commerce in these terms.
JAVA:
Feels a giant to me, and impresses me at times, a myth to me, I am speaking illogical I know, and after android, I see a great potential in this language.
Edited by Digitizer, 28 August 2014 - 06:03 PM. Hey,
I have really looked around and done the research on books and video tutorials about object oriented programming, though I am having difficulties to find something good which gets myself started.
Could somebody recommend me a good book or video tutorials, where I could get started with when it comes to Object Oriented Programming. I am looking to use Object Oriented Programming for building a blog website.
Hi everybody,
So I used to be a pretty decent PHP developer, but I haven't done much with programming for the last 8 years. I switched to the healthcare industry after the big dot-com boom and I'm finishing up a doctorate in nursing this spring. I decided to try and get back into programming to pursue some online teaching projects I want to take on and wow, have I forgotten a lot!
I've got a WordPress site up and I've manged to teach myself some decent animation skills in Flash and After Effects. Now I'm looking to try and build a set of database tables to house medication calculation equations, answers, and some metadata. I've been looking around to try and find some WordPress addons that will let me edit database tables, but everything I've been able to find turns out to be a table editor in the "Microsoft Word" sense of the word, and not actually usable to manage database tables. Is there anything out there that could save me a big chunk of time?
Looking forward to some development after a long break though. I don't plan on working through a shell, so I'm going to be using a text editor on a PC. Any suggestions for making the writing and syncing easily that might make my life easier?
Thanks,
-Bart
Edited by NerdDoc, 09 September 2014 - 07:21 PM. Hello! I'm making a program in C++ which has some variables that I need to show inside my .php page. So, I have 2 main questions 1) Is there a possible way to detect when my .php page is being requested 2) After this to inform the C++ program that the page is being requested (editing a file or writing to files would be preferable to be avoided) and 3) After this the C++ program to give to php the variables that I want to show (again writing to files isn't preferable) Perhaps question (3) is not for these forums, but I'd like to know if someone has an idea about the issue.... Unfortunately I have the impression that PHP is a simple script language and cannot do s0 high-level things... Prove me wrong, please This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=332907.0 I have this image upload script he
<?php if (isset($_POST['submit'])) { $j = 0; //Variable for indexing uploaded image $target_path = $_SERVER['DOCUMENT_ROOT'] . "/ubergallery/multiple_image_upload/uploads/"; //Declaring Path for uploaded images for ($i = 0; $i < count($_FILES['file']['name']); $i++) {//loop to get individual element from the array $validextensions = array("jpeg", "jpg", "png"); //Extensions which are allowed $ext = explode('.', basename($_FILES['file']['name'][$i]));//explode file name from dot(.) $file_extension = end($ext); //store extensions in the variable $target_path = $target_path . md5(uniqid()) . "." . $ext[count($ext) - 1];//set the target path with a new name of image $j = $j + 1;//increment the number of uploaded images according to the files in array if (($_FILES["file"]["size"][$i] < 100000) //Approx. 100kb files can be uploaded. && in_array($file_extension, $validextensions)) { if (move_uploaded_file($_FILES['file']['tmp_name'][$i], $target_path)) {//if file moved to uploads folder echo $j. ').<span id="noerror">Image uploaded successfully!.</span><br/><br/>'; } else {//if file was not moved. echo $j. ').<span id="error">please try again!.</span><br/><br/>'; } } else {//if file size and file type was incorrect. echo $j. ').<span id="error">***Invalid file Size or Type***</span><br/><br/>'; } } } ?>This script also uses javascript for multiple uploading of images. I am looking to add a query to this where I am looking to have the image file names stored in the database. The original image file name should get stored as well, yet the file name itself should get a unique id. I may have to build this query inside this upload script. I was wondering if I can keep that separately with Object Oriented Programming, if somebody just could show me "how it could look like", when it comes to having this done with Object Oriented Programming, I would appreciate it a lot. |