[Solved] Inserting data into mySQL table from mutlidimensional input form

What I’m assuming is.. SomePage.php <input type=”text” name=”quantity[]”> <input type=”text” name=”description[]”> <input type=”text” name=”article[]”> <input type=”text” name=”price[]”> <input type=”text” name=”tax[]”> <input type=”text” name=”discount[]”> Submit_Some_Page.php <? extract($_POST); $TotalArticle=sizeof($article); for($i=0;$i<$TotalArticle;$i++) { $Article=$article[$i]; $Quanity=$quantity[$i]; $Price=$price[$i]; $Tax=$tax[$i]; $Discount=$discount[$i]; $Description=$description[$i]; <– Now, Write Insert Query Here.. $Query=”INSERT INTO TableName SET Col1Name=$Article,Col2Name=$Quanity,Col3Name=$Price,Col4Name=$Tax,Col5Name=$Discount,Col6Name=$Description”; ….. Write Mysql Query To Execute It } ?> … Read more

[Solved] PHP does not insert into mysql

I think you didn’t close out the Values with an end parentheses. $result = mysql_query( “INSERT INTO property( Pname, P_Price,P_Desc,P_City, P_Size,P_Rooms, P_garage, P_Address, P_Long, P_Lat, P_Sold, Provinces_idProvinces) VALUES(‘http://10.0.2.2/images/pic3.jpg’,98000,’beautifull house’,’Durban’,’7m’,1,2,’L-377 Umlazi’,’30.863226′,’-29.971518′,0,’1′)”); solved PHP does not insert into mysql

[Solved] Show calculation of textboxes with decimal using javascript [closed]

Try this: $(‘#Text4’).val(parseInt($(‘#Text1’).val()) * 100 + parseInt($(‘#Text2’).val()) + parseInt($(‘#Text3’).val()) / 10); function doCalculation() { $(‘#Text4’).val(parseInt($(‘#Text1’).val()) * 100 + parseInt($(‘#Text2’).val()) + parseInt($(‘#Text3’).val()) / 10); } <script src=”https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js”></script> <input name=”txtArea1″ type=”text” id=”Text1″ style=”width: 20%;” /> – <input name=”txtArea2″ type=”text” id=”Text2″ style=”width: 20%;” /> – <input name=”txtArea3″ type=”text” id=”Text3″ style=”width: 20%;” /> <input name=”txtGuntha” type=”text” id=”Text4″ style=”width: 80%;” … Read more

[Solved] Constrains for ImageView is not working

After researching a bit I have came up with the following way to solved this issue of AutoLayout with UICollectionViewCell. From Xcode 6 CollectionViewCell doesn’t show the contentView in interface builder, so in the awakeFromNib of cell I have set its autoresizingMask and it works like charm. class CustomCell: UICollectionViewCell { @IBOutlet var imageView: UIImageView! … Read more

[Solved] How to write a function named isMeera that returns 1 if its array argument is a Meera array. Otherwise, it returns 0 [closed]

Finally it works successfully ! public static int isMeera(int [] a){ boolean hasOdd = false; int firstEven = 0; int lastEven = 0; boolean firstCountEnd = false; boolean lastCountEnd = false; for(int i = 0; i<a.length; i++){ if (a[i]%2 == 1) { hasOdd = true; break; } } if (!hasOdd) return 0; for (int j … Read more

[Solved] joining of two list in C# [closed]

If the indexes of the two lists are the same, then you can do: static void Main(string[] args) { List<string> Mksnos = new List<string>() { “Toyota”, “Honda is Good”, “Innova is very good” }; List<string> GdsDscr = new List<string>() { “Toyota is a very good brand and it is costly”, “The carmaker’s flagship sedan is … Read more

[Solved] C# Console Create simple app not longer than 2 lines

One way to do is use a ternary operator inside another ternary operator. It does the job in two lines. var input = Console.ReadLine(); Console.WriteLine((input == “1”) ? (“2”) : (input == “2” ? “1” : “Enter 1 or 2”)); 2 solved C# Console Create simple app not longer than 2 lines

[Solved] Tic-Tac-Toe game weird symbol

Those ‘weird symbols’ are unicode characters. After declaring your board, the char values are just random symbols, what else should the board elements contain? You have to initialize your board like this: Either on declaration: char board[3][3] = { {‘ ‘,’ ‘,’ ‘}, {‘ ‘,’ ‘,’ ‘}, {‘ ‘,’ ‘,’ ‘} }; Or in the … Read more

[Solved] What join should I use with MySQL? [closed]

There are a few small mistakes in your query. In the ‘From’ section you only need to use the first table, and you’ll need to tell the join which field from the first table matches which field in the second table. In the where you’ll only have to match one field to $savingsId This query … Read more

[Solved] RegEx help in JavaScript – extract second match [duplicate]

const regex = /”\w+\|/g; const str = `mmSuggestDeliver(0, new Array(“Name”, “Category”, “Keywords”, “Bias”, “Extension”, “IDs”), new Array(new Array(“Advance Auto Parts Inc.”, “Aktien”, “982516|US00751Y1064|AAP||”, “85”, “”, “Advance_Auto_Parts|982516|1|13715”),new Array(“iShares China Large Cap UCITS ETF”, “Anzeige”, “”, “100”, “”, “http://suggest-suche-A0DK6Z”)), 2, 0);`; let m; while ((m = regex.exec(str)) !== null) { // This is necessary to avoid infinite … Read more

[Solved] What’s wrong with my button?

Make your button type as “submit” like below. <button type=”submit” name=”ubah” class=”btn btn-primary”>Ubah</button> Else you can also keep it as button, but in that case u need to use ajax(javascript) and onclick event on button , for example : <button type=”button” name=”ubah” class=”btn btn-primary” onclick=”save()”>Ubah</button> where save() is some function in javascript that you will … Read more