Search Results

Search found 42698 results on 1708 pages for 'php in array'.

Page 161/1708 | < Previous Page | 157 158 159 160 161 162 163 164 165 166 167 168  | Next Page >

  • post values to external page explicitly PHP

    - by JPro
    Hi, I want to post values to a page through a hyperlink in another page. Is it possible to do that? Let's say I have a page results.php which has the starting line, <?php if(isset($_POST['posted_value'])) { echo "expected value"; // do something with the data } else { echo "no the value expected"; } If from another page say link.php I place a hyperlink like this: <a href="results.php?posted_value=1"> , will this be accepetd by the results page? If instead if I replace the above starting line with if(isset($_REQUEST['posted_value'])), will this work? I believe the above hyperlink evaluates to GET, but since the only visibility difference between GET and POST that is you can see parameters in the address bar with GET But, is there any other way to place a hyperlink which can post values to a page? or can we use jquery in the place of hyperlink to POST the values? Can anyone please suggest me something on this please? Thanks.

    Read the article

  • An array with values 4 days apart

    - by Luke
    I have a piece of code that generates soccer/football fixtures. The idea is that for every round of fixtures, the date will be 4 days further than the last round. So round one will be 3rd may, round two will be 7th may, round three 11th may, etc. I am not sure how to do this? The code that currently makes the fixtures are as follows: $totalRounds = $teams - 1; $matchesPerRound = $teams / 2; $rounds = array(); for ($i = 0; $i < $totalRounds; $i++) { $rounds[$i] = array(); } for ($round = 0; $round < $totalRounds; $round++) { for ($match = 0; $match < $matchesPerRound; $match++) { $home = ($round + $match) % ($teams - 1); $away = ($teams - 1 - $match + $round) % ($teams - 1); // Last team stays in the same place while the others // rotate around it. if ($match == 0) { $away = $teams - 1; } $rounds[$round][$match] = "$user[$home]~$team[$home]@$user[$away]~$team[$away]"; } } The teams would be the total users in the league. So if there are 8 teams, there will be 7 rounds. And i will want each round 4 days apart. And that date will be within each fixture within each round. Any further information needed just ask! Thanks, really stuck on this

    Read the article

  • What is good about php/what is php good for?

    - by Roman A. Taycher
    I have often seen php bashed around the webs as a loosely typed(loose typing as in a lot of type coercion and/or easy(and perhaps common) to cast object all over not dynamic typing) language without a great compiler/interpreter/vm, with even the standard library using a number of different naming conventions. A lot of people complain about perl but many (including a lot of the complainers) also give it a lot of credit for its regexes and general flexibility and power. Other then legacy code , giant web frameworks that can do tons(drupal,ect.), and easy cheap hosting what is good about php (,also what criticism are unfair, and how is the language evolving to overcome its problems). Why would i want to learn it? why would I want to do an independent project in it? The main thing I have heard is that its php codes simplicity is sometimes easier then the over-engineered complexity you find in certain Java frameworks and applications. I'm not just trolling, i'm genuinly curious what makes php programmers use it. try to convince me to put it on my languages to dabble in and languages to learn more in depth lists.

    Read the article

  • PHP foreach help

    - by sea_1987
    Hello I have an array that looks like this, Array ( [cfi_title] => Mr [cfi_firstname] => Firstname [cfi_surname] => Lastname [cfi_email] => [email protected] [cfi_subscribe_promotional] => [cfi_tnc] => [friendsName] => Array ( [0] => Firstname 1 [1] => Firstname 2 [2] => Firstname 3 ) [friendsEmail] => Array ( [0] => [email protected] [1] => [email protected] [2] => [email protected] ) [submit_form] => Submit ) My dilema is I need to save the values from the friendsName and friendsEmail arrays into a database, I know I can loop through them but how can I send the matching data, for example I need to save [friendsName][0] and friendsEmail][0] on the same row of database? I know I need to use a foreach but I just cannot figure out the logic.

    Read the article

  • filtering search results with php

    - by fl3x7
    Hello, Cant really find any useful information on this through Google so hope someone here with some knowledge can help. I have a set of results which are pulled from a multi dimensional array. Currently the array key is the price of a product whilst the item contains another array which contains all the product details. key=>Item(name=>test, foo=>bar) So currently when I list the items I just order by the key, smallest first and it lists the products smallest price first. However I want to build on this so that when a user sees the results they can choose other ordering options like list all products by a name, certain manufacturer, colour, x ,y ,z etc etc from a drop down box(or something similar) This is where I need some guidance. Im just not sure how to go about it or best practise or anything. The only way I can think of is to order all the items by the nested array eg by the name, manufacturer etc. but how do I do that in PHP? Hope you understand what im trying to achieve(if not just ask). Any help on this with ideas, approaches or examples would be great. Thanks for reading p.s Im using PHP5

    Read the article

  • PHP login, getting wrong count value from query / fetch array

    - by Chris
    Hello, *EDIT*Thanks to the comments below it has been figured out that the problem lies with the md5, without everything works as it should. But how do i implent the md5 then? I am having some troubles with the following code below to login. The database and register system are already working. The problem lies that it does not find any result at all in the query. IF the count is 0 it should redirect the user to a secured page. But this only works if i write count = 0, but this should be 0 , only if the user name and password is found he should be directed to the secure (startpage) of the site after login. For example root (username) root (password) already exists but i cannot seem to properly login with it. <?php session_start(); if (!empty($_POST["send"])) { $username = ($_POST["username"]); $password = (md5($_POST["password"])); $count = 0; $con = mysql_connect("localhost" , "root", ""); mysql_select_db("testdb", $con); $result = mysql_query("SELECT name, password FROM user WHERE name = '".$username."' AND password = '".$password."' ") or die("Error select statement"); $count = mysql_num_rows($result); if($count > 0) // always goes the to else, only works with >=0 but then the data is not found in the database, hence incorrect { $row = mysql_fetch_array($result); $_SESSION["username"] = $row["name"]; header("Location: StartPage.php"); } else { echo "Wrong login data, please try again"; } mysql_close($con); } ?>

    Read the article

  • Passing Javascript value to PHP Variable using ajax

    - by shels
    I am trying to use a Flash detection script to assess whether Flash Plugin is enabled in the user browser so that a different page loads. The Flash detection script is as follows, using jquery 1.8.2 and jquery.jqplugin 1.0.2 <script type="text/javascript" src="jquery-1.8.2.min.js"></script> <script type="text/javascript" src="jquery.jqplugin.1.0.2.min.js"></script> <script type="text/javascript"> $(document).ready(function() { $("#withflash").hide(); $("#noflash").hide(); if ($.browser.flash == true) $("#withflash").show (); else $("#noflash").show (); }); </script> <div id="withflash">Flash Supported</div> <div id="noflash">Flash Not Supported</div> I get the display that "Flash Supported" if Flash Plugin is present.. I need to capture the value whether flash plugin value is true in a php variable $hasFlashSupport as below: <?php echo " $hasFlashSupport"; exit; ?> I am aware that PHP is server based and Javascript is client based.. Hence Ajax would be a nice option to capture the javascript variable to my php variable. I am totally ignorant about Ajax syntax and how to achieve it. Request the experts here to help me out with the code on how this can be achieved... Thanking all of you in advance..

    Read the article

  • PHP & MySQL storing multiple values in a database.

    - by R.I.P.coalMINERS
    I'm basically a front end designer and new to PHP and MySQL but I want a user to be able to store multiple names and there meanings in a MySQL database table named names using PHP I will dynamically create form fields with JQuery every time a user clicks on a link so a user can enter 1 to 1,000,000 different names and there meanings which will be stored in a table called names. All I want to know is how can I store multiple names and there meanings in a database and then display them back to the user for them to edit or delete using PHP MySQL? I created the MySQL table already. CREATE TABLE names ( id INT UNSIGNED NOT NULL AUTO_INCREMENT, userID INT NOT NULL, name VARCHAR(255) NOT NULL, meaning VARCHAR(255) NOT NULL, PRIMARY KEY (id) ); Here is the HTML. <form method="post" action="index.php"> <ul> <li><label for="name">Name: </label><input type="text" name="name" id="name" /></li> <li><label for="meaning">Meaning: </label><input type="text" name="meaning" id="meaning" /></li> <li><input type="submit" name="submit" value="Save" /> <input type="hidden" name="submit" value="true" /></li> </ul> </form>

    Read the article

  • PHP site scheduling Java execution?

    - by obfuscation
    I'm trying to get started on combining my (slightly limited) PHP experience with my (better) Java experience, in a project where I need to allow uploads of Java source files to the server, which the server then executes Javac on to compile it. Then, at a set time (e.g. specified on upload) I need to run that once on the server, which will generate some database info for the PHP site to display. To describe my current programming abilities- I have made many desktop Java programs, and am confident in 'pure' Java, but so far have only undertaken a couple of PHP projects (including using the CodeIgniter framework). My motivation for using PHP as the frontend is because I know it is very fast, lightweight and I will be able to display the results I need very easily with it (simple DB readout). Ideally, the technology used should be able to be developed on a localhost (e.g. WAMP, Tomcat etc..) Is there any advice which you could give on what technology I should consider to use to bridge this gap, and what resources could help in using that technology? I have looked at a few, but have struggled to find documentation helping in achieving what I need.

    Read the article

  • Write transparent HTTP Proxy script in PHP

    - by Leo Izen
    Is there an easy forwarding/transparent php proxy script that I can host on my web server? These are my conditions: I'm using free web hosting, so I have pretty much no control over my machine. Otherwise I could use Perl's HTTP::Proxy module. This means no root password. It does run php though. I already have a server running on port 80. What I mean is I would like to put a php script as index.php on my server that will forward all requests. I don't want a script like PHProxy or Glype where I go to the site, then enter a URL. I want a server so I can enter proxy.example.com:80 in Firefox's or IE's or whatever's proxy settings and it will forward all requests to the server. Preferably (though not fatal if not possible) I would like for it to pass on the USER_AGENT environmental variable (That's the browser) instead of setting itself to be the USER_AGENT I can't start a new Daemon. My server won't allow it. Is there a script that will do this? If so, which?

    Read the article

  • Pi help with Php (mass looping)

    - by Pieman
    My primary question is: Is this alot of loops? while ($decimals < 50000 and $remainder != "0") { $number = floor($remainder/$currentdivider); //Always round down! 10/3 =3, 10/7 = 1 $remainder = $remainder%$currentdivider; // 10%3 =1, 10%1 $thisnumber = $thisnumber . $number; $remainder = $remainder . 0; //10 $decimals += 1; } Or could I fit more into it? -without the server crashing/lagging. I'm just wondering, Also is there a more effiecent way of doing the above? (e.g. finidng out that 1/3 = 0.3 to 50,000 decimals.) Finally: I'm doing this for a pi formulae the (1 - 1/3 + 1/5 - 1/7 etc.) one, And i'm wondering if there is a better one. (In php) I have found one that finds pi to 2000 in 4 seconds. But thats not what I want. I want an infinite series that converges closer to Pi so every refresh, users can view it getting closer... see: http://zombiewrath.com/pi.php (Old one) and 'zombiewrath.com/superpi.php' (Newer one) But obv. converging using the above formulae takes ALONG time. Is there any other 'loop' like Pi formulaes (workable in php) that converge faster? Thanks alot...

    Read the article

  • How to pass values from array into mysql with php

    - by moustafa
    my original code is this <tr> <th> <label for="user_level"> User Level: * <?php echo isset($valid_user_level) ? $valid_user_level : NULL; ?> </label> </th> </tr> <td> <select name="user_level" id="user_level" class="sel"> <option value="">Select one…</option> <option value="1">User</option> <option value="5">Admin</option> </select> </td> this give me the option to select one of choice from the drop down menu i.e. user and when user is selected and the submit button is pressed this will insert the value 1 into the database which will when the user logs in tell the system that they are are normal user. I want to change the code to the following <tr> <td> <select name="user_level" id="user_level" class="sel"> <option value="">Select one…</option> <?php if(!empty($level)) { foreach($level as $value) { echo "<option value='{$value}'"; echo getSticky(2,'user_level',$value); echo ">{$value}</option>"; } } ?> </select> </td> </tr> With this being my array query $level = array('User','Admin'); How can I pass the values of 1 for user level and 5 for admin in this code so when the user is selected it inouts 1 into the database?

    Read the article

  • PHP Fix Warning: Cannot modify header information - headers already sent...

    - by Storm Kiernan
    Warning: Cannot modify header information - headers already sent by (output started at /home/blocexco/public_html/homepage.php:73) in /home/blocexco/public_html/classes/mysql/mysql.security.php on line 99 This error is repeated a second time for mysql.security.php on line 100. homepage:73 <div class="login"> <?php require_once 'login.php'; ?> </div> mysql.security.php: 99-100 setcookie('username', "", time() - (60 * 60 * 24 * 365)); setcookie('password', "", time() - (60 * 60 * 24 * 365)); I know this isn't a "BOM" issue as I've read about. There is output before and after my calls to header() and setcookie() functions - this is necessary since the homepage includes a php file which then injects the right login or logout form. I've heard about using ob_start() at the beginning of content, but that's not a very specific instruction...I tried placing it at the beginning of homepage.php (just before the html tag) and that didn't fix anything. I'm new to PHP (a few days in, and new to web-app dev in general). To be honest, it blows my mind that I can't just change which page I am on, via php without bending over backwards...

    Read the article

  • Error while saving csv file generated by PHP

    - by user1667374
    I have created below script which is saving the csv file in the same path of this script but when I am saving it to different directory, it gives me error. Can somebody please help me on this? This is the error: Warning: fopen(/store/secure/mas/) [function.fopen]: failed to open stream: No such file or directory in /getdetails.php on line 15 Warning: fputs(): supplied argument is not a valid stream resource in /getdetails.php on line 36 Warning: fclose(): supplied argument is not a valid stream resource in /getdetails.php on line 39 This is the script: <?php $MYSQL_HOST="localhost"; $MYSQL_USERNAME="***"; $MYSQL_PASSWORD="***"; $MYSQL_DATABASE="shop"; $MYSQL_TABLE="ds_orders"; mysql_connect( "$MYSQL_HOST", "$MYSQL_USERNAME", "$MYSQL_PASSWORD" ) or die( mysql_error( ) ); mysql_select_db( "$MYSQL_DATABASE") or die( mysql_error( $conn ) ); $filename="Order_Details"; $directory = "/store/secure/mas/"; $csv_filename = $filename.".csv"; $fd = fopen ( "$directory" . $cvs_filename, "w"); $today="2009-03-17"; $disp_date="05122008"; $sql = "SELECT * FROM $MYSQL_TABLE where cDate='$today'"; $result=mysql_query($sql); $rows=mysql_num_rows($result); echo $rows; if(mysql_num_rows($result)>0){ $fileContent="Record ID,Discount Percent\n"; while($data=mysql_fetch_array($result)) { $fileContent.= "".$data['oID'].",".$data['discount']."\n"; } $fileContent=str_replace("\n\n","\n",$fileContent); fputs($fd, $fileContent); } fclose($fd); ?>

    Read the article

  • Problem Initializing an Array Of Structs

    - by FallSe7en
    I am trying to initialize the following array of the following struct, but my code isn't compiling. Can anybody help me out? The struct/array: struct DiningCarSeat { int status; int order; int waiterNum; Lock customerLock; Condition customer; DiningCarSeat(seatNum) { char* tempLockName; sprintf(tempLockName, "diningCarSeatLock%d", seatNum); char* tempConditionName; sprintf(tempConditionName, "diningCarSeatCondition%d", seatNum); status = 0; order = 0; waiterNum = -1; customerLock = new Lock(tempLockName); customer = new Condition(tempConditionName); } } diningCarSeat[DINING_CAR_CAPACITY]; The relevant errors: ../threads/threadtest.cc: In constructor `DiningCarSeat::DiningCarSeat(int)': ../threads/threadtest.cc:58: error: no matching function for call to `Lock::Lock()' ../threads/synch.h:66: note: candidates are: Lock::Lock(const Lock&) ../threads/synch.h:68: note: Lock::Lock(char*) ../threads/threadtest.cc:58: error: no matching function for call to `Condition::Condition()' ../threads/synch.h:119: note: candidates are: Condition::Condition(const Condition&) ../threads/synch.h:121: note: Condition::Condition(char*) ../threads/threadtest.cc:63: error: expected primary-expression before '.' token ../threads/threadtest.cc:64: error: expected primary-expression before '.' token ../threads/threadtest.cc: At global scope: ../threads/threadtest.cc:69: error: no matching function for call to `DiningCarSeat::DiningCarSeat()' ../threads/threadtest.cc:51: note: candidates are: DiningCarSeat::DiningCarSeat(const DiningCarSeat&) ../threads/threadtest.cc:58: note: DiningCarSeat::DiningCarSeat(int) Thanks in advance!

    Read the article

  • PHP function to handle most database queries has a problem with results. I am getting the right numb

    - by asdasds
    Here is my little function. It does not handle the results correctly. I do get all the rows that I want, but all the rows of the $results array contain the exact same values. So i make 2 arrays, a temporary array to hold the values after each fetch, and another array to hold all the temporary arrays. First i take the temp array and map its keys to the column names. Then i give it to bind_result, and call fetch() and use it like I would any other result value. Could this be because I re-use the $results array? numresults is the number of values you are taking from each row. if 0, you are not getting any results back. function db_query($db, $query, $params = NULL, $numresults = 0) { if($stmt = $db -> prepare($query)) { if($params != NULL) { call_user_func_array(array($stmt, 'bind_param'), $params); } if(!$stmt -> execute()) { //echo 'exec error:',$db->error; return false; } if($numresults > 0) { $results = array(); $tmpresult = array(); $meta = $stmt->result_metadata(); while ($columnName = $meta->fetch_field()) $tmpresult[] = &$results[$columnName->name]; call_user_func_array(array($stmt, 'bind_result'), $tmpresult); $meta->close(); $results = array(); while($stmt -> fetch()) $results[] = $tmpresult; } $stmt -> close(); } else { //echo 'prepare error: ',$db->error; return false; } if($numresults == 0) return true; return $results; }

    Read the article

  • Ajax Code to run PHP query After Facebook Like Button is Clicked

    - by John
    I have the PHP below on a file called fblike.php. On another file, I have the Facebook Like button. The Like button functions. I would like to run the code below when the Facebook Like button is clicked. I know that FB.Event.subscribe('edge.create', function(response) {} is supposed to run whenever the Like button is clicked. I know that I am probably supposed to use Javascript and maybe Ajax to cause the PHP on fblike.php to run. But after multiple tries, I can't get it to work. What is the specific Ajax code that I could include within the Facebook Event? Do I need to do anything to the Like button code to allow the Facebook Event to work? $submissionid = $_POST['submissionid']; $uid = $_POST['uid']; mysql_connect("server", "username", "password") or die(mysql_error()); mysql_select_db("database") or die(mysql_error()); $q = "INSERT INTO fblikes VALUES (NULL, '$submissionid', '$uid', NULL)"; $r = mysql_query($q); if($r) { echo "Success!"; } elseif(!$r) { echo "Failed!"; }

    Read the article

  • Outputting array contents as nested list in PHP

    - by Mamadou
    I have the array $tab[1,2,3,4,5,6,7,8,9,10] and I would like to display it like this: <ul> <li> <a href=""/>FIRST ELEMENT OF THE TAB ==> 1</a> <a href=""/>2ND ELEMENT OF THE TAB ==> 2</a> </li> <li> <a href=""/>3THIRD ELEMENT==> 3</a> <a href=""/>FORTH ELEMENT OF THE TAB ==> 4</a> </li> <li> <a href=""/>FIFTH ELEMENT==> 5</a> <a href=""/>SIXTITH ELEMENT OF THE TAB ==> 6</a> </li> </ul> How can I achieve this in PHP? I am thinking of creating a sub array with array_slice.

    Read the article

  • PHP and use of the Num_Of_Rows() function?

    - by Michael Smith
    Below is some PHP code that i have written, the problem occurs when it gets to the use of the num_of_rows(), it just does not seem to work and i cant figure out why? <?php try { $divMon_ID = array(); $divMon_Position = array(); $divMon_Width = array(); $divMon_Div = array(); $db = new PDO('sqlite:db/EVENTS.sqlite'); $result_mon = $db->query('SELECT * FROM Monday'); $totalRows = mysql_num_rows($result_mon); //for($counter=1; $counter<=10; $counter+=1) //{ //<div id="event_1" style="position:absolute; left: 0px; top:-39px; width:100px; font-family:Arial, Helvetica, sans-serif; font-size:small; border:2px blue solid; height:93px"> //$divMon_ID[]=$row['Id']; //$divMon_Position[]=$row['Origin']; //$divMon_P[]=$row['Position']; //} } catch(PDOException $e) { print 'Exception : '.$e->getMessage(); } ? I know that it is the "$totalRows = mysql_num_rows($result_mon);" statement because when i then comment it out, the page can load. Am i using the function in the wrong way? Thanks.

    Read the article

  • php, how to get a array varible value ?

    - by NovaYear
    $lang['profil_basic_medeni'] = array( 1 => 'Bekâr', 2 => 'Evli', 3 => 'Nisanli', 4 => 'Iliskide', 5 => 'Ayrilmis', 6 => 'Bosanmis' ); $lang['profil_basic_sac'] = array( 1 => 'Normal', 2 => 'Kisa', 3 => 'Orta', 4 => 'Uzun', 5 => 'Fönlü', 6 => 'Saçsiz (Dazlak)', 7 => 'Karisik/Daginik', 8 => 'Her Zaman Bol Jöleli :)' ); function sGetVAL($item,$valno) { $sonuc = $lang[$item][$valno]; return $sonuc; } $tempVAL1 = sGetVAL('profil_basic_medeni','3'); // return null //or $tempVAL2 = sGetVAL('profil_basic_sac','7'); // return null $tempVAL1 or $tempVAL2 always return null. why ? how to fix function sGetVAL ???

    Read the article

  • How would one dynamically load Javascript that has been parsed as PHP?

    - by beatsforthemind
    I am looking to dynamically load javascript that has been parsed as PHP so that I will be able to pass PHP variables to javascript, and then load this file into the primary PHP document. I have a document called myscript.js.php that includes the javascript and PHP. I attempted to load it into the primary document using jQuery's getScript like this: $.getScript("myscript.js.php", function() { alert('loaded script.'); }); This attempt failed - I am assuming because of the .php extension on the file. Is there anyway to dynamically load javascript that includes PHP? I have a few session variables that I am looking to pass through javascript that will be updated frequently, creating a need for the javascript to be reloaded.

    Read the article

  • Is ASP.NET MVC completely (and exclusively) based on conventions?

    - by Mike Valeriano
    --TL;DR Is there a "Hello World!" ASP.NET MVC tutorial out there that doesn't rely on conventions and "stock" projects? Is it even possible to take advantage of the technology without reusing the default file structure, and start from a single "hello_world.asp" file or something (like in PHP)? Am I completely mistaken and I should be looking somewhere else, maybe this? I'm interested in the MVC framework, not Web Forms --Background I've played a bit with PHP in the past, just for fun, and now I'm back to it since web development became relevant for me once again. I'm no professional, but I try to gain as much knowledge and control over the technology I'm working with as possible. I'm using Visual Studio 2012 for C# - my "desktop" language of choice - and since I got the Professional Edition from Dreamspark, the Web Development Tools are available, including ASP.NET MVC 4. I won't touch Web Forms, but the MVC Framework got my attention because the MVC pattern is something I can really relate to, since it provides the control I want but... not quite. Learning PHP was easy - and right form the start I could just create a "hello_world.php" file and just do something like this for immediate results: <!-- file: hello_world.php --> <?php> echo "Hello World!"; <?> But I couldn't find a single ASP.NET (MVC) tutorial out there (I'll be sure to buy one of the upcoming MVC 4 books, only a month away or so) that would start like that. They all start with a sample project, building up knowledge from the basics and heavily using conventions as they go along. Which is fine, I suppose, but it's now the best way for me to learn things. Even the "Empty" project template for a new ASP.NET MVC 4 Application in VS2012 is not empty at all: several files and folders are created for you - much like a new C# desktop application project, but with C# I can in fact start from scratch, creating the project structure myself. It is not the case with PHP: I can choose from a plethora of different MVC frameworks I can just create my own framework I can just skip frameworks altogether, and toss random PHP along with my HTML on a single file and make it work I understand the framework needs to establish some rules, but what if I just want to create a single page website with some C# logic behind it? Do I really need to create a whole bloat of files and folders for the sake of convention? Also, please understand that I haven't gotten far on any of those tutorials mainly because of this reason, but, if that's the only way to do it, I'll go for it using one of the books I've mentioned before. This is my first contact with ASP.NET but from the few comparisons I've read, I believe I should stay the hell away from Web Forms. Thank you. (Please forgive the broken English - it is not my primary language.)

    Read the article

  • Career Development: What should I learn next after Python? and Why? [closed]

    - by Josh
    Hi all I'm currently learning Python. I want to know what should I learn next out of these programming langauages: PHP Actionscript 3 Objective-C (iPhone applications) I work in the Multimedia industry and have decided to learn Python as a first programming language seriously because I would like to learn the basics of programming, to mainly write scripts at work that Automate task (eg. Edit multiple XML files quickly) At work we have a senior developer who knows Actionscript and PHP very well (although knows PHP better). We also have been developing iPhone applications for 2 weeks, Our senior developer could learn it although we have lots of work currently with PHP and Actionscript 3 type work and haven't had time or reason to pick up iOS development. Here are the reasons I want to learn each language, But I cannot decide what I'll learn next: PHP: I want to learn PHP because it will help with Web Development. PHP is very wanted by employers. Senior developer at work writes everything in it web sites, CMS etc. (including XML checks and scripts), I will learn a lot from him (once I learn the basics). However, I don't want to learn Web because you have to deal with lots of cross-browser problems. Actionscript 3: At work we are looking to put on another developer to help with online activities and very small games (using Actionscript 3.0 and Flash CS5) for (eg. First Aid Activities etc) I would like to do things that have a element of design as I'm better at Photoshop then developing. I want to be creative, I like to interact with users in a fun way. Objective-C (iPhone applications): We are a all mac office, we may get more iPhone, iPad application work(jobs) that need to be created. Work has found it nearly impossible to find good iPhone developers. I like apple products (Macs and iPhones), I would like to make my own games, applications in my spare time(if I knew how). Should I learn Actionscript first because it would be easier to learn then Objective-C? Should I learn PHP because it is very widely used? Should I learn Objective-C because it is really wanted by employers now?

    Read the article

  • PHP - Store & Calculate the total mark from radio input

    - by user1806136
    I have designed a small web-based system that have a school evaluation form to ask specific users who can access the system" some questions and the input will be a radio type ( 1 or 2 or 3 or 4)! the code is working and can inserts the input into the database but i don't know the correct query to calculate the total mark and store it in the database, this is currently working code below: <?php session_start(); $Load=$_SESSION['login_user']; include('../connect.php'); $sql= "Select name from student where ID='$Load'"; $username = mysql_query($sql); $id=$_SESSION['login_user']; if (isset($_POST['submit'])) { $v1 = $_POST['v1']; $v2 = $_POST['v2']; $v3 = $_POST['v3']; $total = $_POST['total']; mysql_query("INSERT into Form1 (P1,P2,P3,TOTAL) values('$v1','$v2','$v3','$total')") or die(mysql_error()); header("Location: mark.php"); } ?> <html> <head> <?php if(!isset($_SESSION['login_user'])) header("Location:index.html"); ?> <title>Q&A Form</title> </head> <body> <center><form method="post" action="" > <table style="width: 20%" > <tr> <th> Criteria </th> <th> </th> </tr> <tr> <th> Excellent </th> <td > 4 </td> </tr> <tr> <th > Good <font size="3" > </font></th> <td> 3 <font size="4" > </font></td> </tr> <tr> <th > Average <font size="3" > </font></th> <td > 2 <font size="4" > </font></td> </tr> <tr> <th > Poor <font size="3" > </font></th> <td > 1 <font size="4" > </td> </tr> <font size='4'> <table style="width: 70%"> <tr> <th > School Evaluation <font size="4" > </font></th> <tr> <th > Criteria <font size="4" > </font></th> <th> 4<font size="4" > </font></th> <th> 3<font size="4" > </font></th> <th> 2<font size="4" > </font></th> <th> 1<font size="4" > </font></th> </tr> <tr> <th> Your attendance<font size="4" > </font></th> <td> <input type="radio" name ="v1" value = "4" checked = "checked" /></td> <td> <input type="radio" name ="v1" value = "3" /></td> <td> <input type="radio" name ="v1" value = "2" /></td> <td> <input type="radio" name ="v1" value = "1" /></td> </tr> <tr> <th > Your grades <font size="4" > </font></th> <td> <input type="radio" name ="v2" value = "4" checked = "checked" /></td> <td> <input type="radio" name ="v2" value = "3" /></td> <td> <input type="radio" name ="v2" value = "2" /></td> <td> <input type="radio" name ="v2" value = "1" /></td> </tr> <tr> <th >Your self-control <font size="4" > </font></th> <td> <input type="radio" name ="v3" value = "4" checked = "checked" /></td> <td> <input type="radio" name ="v3" value = "3" /></td> <td> <input type="radio" name ="v3" value = "2" /></td> <td> <input type="radio" name ="v3" value = "1" /></td> </tr> </tr> </table> <br> <a href="evaE.php"> <td><input type="submit" name="submit" value="Submit"> <input type="reset" name="clear" value="clear" style="width: 70px"></td> <?php $total = $v1+ $v2 + $v3; ?> </form> </center> </div> </body> </html> i used this query but it doesn't work out .. any help please? <?php $total = $v1+ $v2 + $v3; ?>

    Read the article

< Previous Page | 157 158 159 160 161 162 163 164 165 166 167 168  | Next Page >