Posts
 
Reputation
Joined
Last Seen
Ranked #3K
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
91% Quality Score
Upvotes Received
33
Posts with Upvotes
31
Upvoting Members
26
Downvotes Received
3
Posts with Downvotes
3
Downvoting Members
3
4 Commented Posts
2 Endorsements
Ranked #621
Ranked #435
~67.9K People Reached
About Me

Software Engineer99X Technology www.99XTechnology.com Sri Lanka

Interests
Music & Movies
PC Specs
Ubuntu
Favorite Tags

118 Posted Topics

Member Avatar for niranga

Hi All, I have a PHP code which do some changes to the POST variables it receives and redirect the page to some other page. This PHP code was initially designed to work without Ajax. So there wasn't any problem with the redirect function and it perfectly handles the POSt …

Member Avatar for Mukul_2
0
13K
Member Avatar for Raakesh399

I found a sample XML file by searching. So I wrote a small php code to read it. I hope this example will help you. <?php // Loading the XML file $xml = simplexml_load_file("books.xml"); echo "<h2>".$xml->getName()."</h2><br />"; foreach($xml->children() as $book) { echo "BOOK : ".$book->attributes()->id."<br />"; echo "Author : ".$book->author." …

Member Avatar for Andrew_24
0
5K
Member Avatar for sirlink99

Following is my Java version I got by running `java -version` and you code perfectly compiled for me java version "1.8.0_45" Java(TM) SE Runtime Environment (build 1.8.0_45-b14) Java HotSpot(TM) Client VM (build 25.45-b02, mixed mode)

Member Avatar for JamesCherrill
0
1K
Member Avatar for erickajan.cajucom

`mysql_query()` returns a resource on success, or FALSE on error. So better if you can check for that before calling mysql_num_rows() if($query) { if(mysql_num_rows($query)==0) { die("User not found"); } else { $row = mysql_fetch_assoc($query); //other code } } else { die("Invalid Query"); }

Member Avatar for niranga
0
211
Member Avatar for AliGulSoomro1

In the `KeyPress` event of the textbox1 text box, check for the text length. When text length is equal to 5 set the focus to textbox2 using `Focus()` method

Member Avatar for Reverend Jim
0
150
Member Avatar for Mike_H

You are missing the `WHERE` clause in the query $query="UPDATE va SET id_key='$id' WHERE id_key='".$row['id_key']."'";

Member Avatar for Mike_H
0
196
Member Avatar for bolfescu

Try to separate the JavaScript. That will look nice =) <script> function redirect(rowID) { window.location="delete_article.php?id="+rowID; } </script> <?php echo "<input type='submit' name='submit' id='submit' class='btn btn-primary' value=Cancella onclick='redirect(\"".$rowId."\");'/>"; ?>

Member Avatar for mattster
0
802
Member Avatar for DawnofanewEra

There are couple of errors I found in your code... 1. You have to import io and util packages in order to use I/O related classes and ArrayList class import java.io.*; import java.util.*; 2. You don't have to put "String" in between variables when declaring them static private String cID, …

Member Avatar for niranga
0
2K
Member Avatar for SharkBait

In the event handler which handles the Click event for the Menu Item, you can set the status bar information. Protected Sub ChangeEnv_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ChangeEnv.Click 'Set the Status Bar Information by iterating child forms here End Sub I think you can use the …

Member Avatar for niranga
0
290
Member Avatar for Amit_21

Try and see whether this works for you $t = time(); if(date("H",$t) < 12) { // Say Good Morning } else { // Say Hello }

Member Avatar for niranga
0
112
Member Avatar for iceparticle.com

What would you expect as a result for the following sequence of integers? 1 2 3 6 7 8 11

Member Avatar for sanjulovers
0
218
Member Avatar for Keyra Lee

As I understood, you want to have nested combo boxes where the child combo box gets repopulated when the parent combo box gets changed. I am sorry if I misunderstood your question.

Member Avatar for urtrivedi
0
1K
Member Avatar for nadiam
Member Avatar for Start4me

I found a way, but little bit messy. Dim numLIst As New List(Of Integer) If Not numLIst.Contains(Number1) Then numLIst.Add(Number1) End If If Not numLIst.Contains(Number2) Then numLIst.Add(Number2) End If If Not numLIst.Contains(Number3) Then numLIst.Add(Number3) End If If Not numLIst.Contains(Number4) Then numLIst.Add(Number4) End If If Not numLIst.Contains(Number5) Then numLIst.Add(Number5) End If Dim …

Member Avatar for Minimalist
0
305
Member Avatar for abelingaw

You can generate the IDs using couple of variables string empPrefix = "EMP"; int counter = 0; public string getNewID() { counter = counter + 1; return empPrefix + counter.ToString("D4"); }

Member Avatar for pritaeas
0
637
Member Avatar for Siberian
Member Avatar for javed.iqbal.3979

You are missing a space in following places Use echo "<option value = $M "; instead of echo "<option value = $M"; Use echo "<option value = $n "; instead of echo "<option value = $n"; Use echo "<option value = $n "; instead of echo "<option value = $n";

Member Avatar for javed.iqbal.3979
0
276
Member Avatar for safi.najjar1

This is new to me too. Found this after googling -> http://www.phpini.in/php/php-incomplete-class-object.html

Member Avatar for veedeoo
0
1K
Member Avatar for iConqueror

I have no idea what InputWrapper is, but I change the code little bit to update the year value inside the loop which you have missed in your code Console.WriteLine("Enter -1 at any time to terminate the program"); string read = Console.ReadLine(); int year = Convert.ToInt32(read); while (year != -1) …

Member Avatar for JOSheaIV
0
351
Member Avatar for Priti_P

Your requirment can be achieved by a foreach loop. I just used an echo for the merge, but u can insert the values to another array as you wish. <?php $arr = Array ( "certificate" => Array ( "name" => Array ( 1 => 11, 2 => 22, 3 => …

Member Avatar for niranga
0
133
Member Avatar for RonKevinT.Manuela

Try starting the session at the top `<?php session_start(); ?>` And **$_SESSION** should be in uppercase

Member Avatar for RonKevinT.Manuela
0
812
Member Avatar for dhani09

You are checking the `$_POST['submitset']` in the PHP code if(isset($_POST['submitset'])) But, in the $.post you are not including that value $.post(url,{oldans: oldanswer.val(), newquest: newquestion.val(), newans: newanswer.val()}, function (data) { ... } So `if(isset($_POST['submitset']))` always returns `false` Try this: $.post(url,{oldans: oldanswer.val(), newquest: newquestion.val(), newans: newanswer.val(), submitset: "true"}, function (data){ ... }

Member Avatar for dhani09
0
273
Member Avatar for James singizi

You code snippet should work fine. Are you getting an error? FYI : `session_start();` must be the first thing sent to the browser, or it won't work properly. Make sure you are not sending anything to the browser before the `if` clause.

Member Avatar for jresponse
0
228
Member Avatar for bLuEmEzzy

Will you be able to post the 'txtShow' function too? Where do you update the $_SESSION['schp'] variable? If you are trying to do a string concatanation in the for loop, you are missing the '.' before the equal sign. `$sch .= $_SESSION['schp'][$i]. "; ";`

Member Avatar for bLuEmEzzy
0
178
Member Avatar for kannan mangalar

Since I have no idea about the structure of your table, i have written following as a sample. Modify it as you wish **HTML** <table> <tr> <td>R1_C1</td> <td>R1_C2</td> </tr> <tr> <td>R2_C1</td> <td>R2_C2</td> </tr> </table> **Javascript** $("table").each(function(){ $("tr", $(this)).each(function(){ $("td", $(this)).each(function(){ console.log($(this).html()); }); }); });

Member Avatar for niranga
0
230
Member Avatar for ikrami

Will you be able to post the code you have written so far with a sample text file?

Member Avatar for jstfsklh211
0
185
Member Avatar for vipula

Try using "http://" infront of the URL <tr> <td>&nbsp;</td><td>&nbsp;</td><td align="right" valign="top"><b>Full Text Link :</b></td> <td align="left" valign="top"><a href='http://<?php echo $FULTEXT;?>' target='_new'><?php echo $FULTEXT;?></a></td> </tr>

Member Avatar for niranga
0
184
Member Avatar for chozokennedy

`document.getElementsByTagName("*")` returns all the tags. Following is the list which it returns * html * head * body * p#demo * div#original * button * script

Member Avatar for AARTI SHRIVAS
0
122
Member Avatar for chandbasha

What is the error you are getting? I think you do not have to put the 1st forward slash in [B]^/100bestbuy/search-(.*)/$[/B]

Member Avatar for diafol
0
254
Member Avatar for rotten69

Interesting point :) I tested you code and added some more lines var array = ["hello", "world", "daniweb"]; alert(array.length); // this will give you three console.log(array); // ["hello", "world", "daniweb"] array.length = 10; // Here is the line that changes the value of length alert(array.length); // this will give 10 …

Member Avatar for Troy III
0
288
Member Avatar for rjony321
Member Avatar for gacusana.aljan
Member Avatar for stultuske
0
106
Member Avatar for my3h

Put a **`var_dump`** above the foreach loop and make sure it has data var_dump($resultViewed); If **`$resultViewed`** has data, put a **`var_dump`** inside the loop and check what is in **`$results`** foreach($resultViewed as $results) { var_dump($results); $stringResult = $stringResult . "['".$results['name']."',".$results['quantity']."],"; } Let's see what's in those variables first and then …

Member Avatar for kurtopia
0
144
Member Avatar for ngchpg
Member Avatar for davy_yg
Re: DOM

Check this thread : http://www.daniweb.com/web-development/php/threads/427263/extract-data-from-an-xml-file-and-display-it-in-php My example might help you. If not feel free to reply :)

Member Avatar for veedeoo
0
265
Member Avatar for davy_yg

Try, $strTemp = preg_replace('/<|>|\||%|;|\(|\)|&|\+|-|:|\x24|@/i', '', $strTemp); NOTE: **`\x24`** will replace **`$`** sign

Member Avatar for niranga
0
137
Member Avatar for Viped

You can not call a non-static method like that Try changing **`Main.setPage(2);`** in **PwGUI.java** to, Main m = new Main(); m.setPage(2);

Member Avatar for JamesCherrill
0
167
Member Avatar for daniel36

I changed your URLs into Google and Facebook, just to make sure other parts are working and it worked. <script language="JavaScript"> function goto(form) { var index=form.select.selectedIndex if (form.select.options[index].value != "0") { location=form.select.options[index].value; } } </script> <FORM NAME="form1"> <SELECT NAME="select" ONCHANGE="goto(this.form)" SIZE="1"> <OPTION VALUE="">-------Choose a Purpose------- <OPTION VALUE="http://www.google.com">Google</option> <OPTION SELECT="SELECTED" VALUE="http://www.facebook.com">Facebook</option> …

Member Avatar for niranga
0
328
Member Avatar for webenveloper

> "SELECT * FROM locations WHERE title LIKE '%".$input."%'"; > > The "SELECT * FROM locations" query only does give me the full table but using that input variable substitution (from an input field) kills my query and returns nothing. (yes the tables are full and contain matches haha) Just …

Member Avatar for webenveloper
0
186
Member Avatar for arctushar

Actually I am not sure why you did something like this: > `if((checkmemory($user,$ayat)==0) || !(checkmemory($user,$ayat)==0))` It is always `true` right? So you are always trying to insert **user_id** and **ayat** without considering what `function checkmemory($user,$ayat)` returns If **user_id** is the primary key your `INSERT` will fail when trying to insert …

Member Avatar for Biiim
0
189
Member Avatar for user543820
Member Avatar for veledrom

You can not apply different formatting to different parts of the same textarea, i.e. you can not make some text bold and some text italic at the same time inside a textarea. It does not identify html tags as html tags when you put in between textarea tags. So that …

Member Avatar for veledrom
0
192
Member Avatar for aristos32

The mistake in your javascript function is, you are giving the same **"name"** to every input you dynamically create. Try assigining input element's **name** and **id** as below element.name = "testname_"+table.rows.length; element.id = "testname_"+table.rows.length; Now you can refer each input value by echo $_POST["testname_1"]; echo $_POST["testname_2"]; echo $_POST["testname_3"]; ...

Member Avatar for aristos32
0
292
Member Avatar for hwoarang69
Member Avatar for mhaselip

I am not sure whether I understood your question correctly. Do want to make sure the GET and POST variables sent from client side to the server are not altered inbetween? If so how about generating a hash value? Sorry if I misunderstood your question

Member Avatar for dany12
0
198
Member Avatar for ashiiiish

`$data` is a result object. You have to fetch array from it like follows $row = mysql_fetch_array($data, MYSQL_ASSOC); $marks = $row['marks']; echo $marks; OR you can replace `$row = mysql_fetch_array($data, MYSQL_ASSOC);` by `$row = mysql_fetch_assoc($data);`

Member Avatar for niranga
0
79
Member Avatar for tabish saroha

Split the String from `[` and `]`. Then from 0th and 4th indexes you can get what you want

Member Avatar for niranga
0
74
Member Avatar for -==Zero==-

I think what you need is automatic page refresh using javascript Following javascript function will do the trick <head> <script type="text/JavaScript"> function refreshPage(timeoutPeriod) { setTimeout("location.reload(true);",refreshPage); } </script> </head> Do the initial call in body onload <body onload="JavaScript:refreshPage(5000);">

Member Avatar for -==Zero==-
0
207
Member Avatar for rrahulrroshan

You can do something like in the following code <?php $comboText = "1-7 Jan 2012"; // Categorizing the weeks $weeks = array('1-7', '8-14', '15-21', '22-28', '29-31'); $comboTextArray = explode(' ',$comboText); $weekNumber = array_search($comboTextArray[0], $weeks); if($weekNumber >= 0) { echo "Week".($weekNumber+1).$comboTextArray[1].$comboTextArray[2]; } ?> **$comboText** must be replaced from the string you …

Member Avatar for niranga
0
63
Member Avatar for DGULLIVER
Member Avatar for niranga
0
185

The End.