103 Posted Topics

Member Avatar for andrewliu

Hey, I am no expert in regexp but quite recently I had the same problem with escaping a $ sign. Just like you I used a single backslash to escape it and when it did not work I experimented with double backslashes and it did work then. I do not …

Member Avatar for andrewliu
0
300
Member Avatar for Buppy

it COULD be tht there is not a value stored in $_SESSION['id'] echo it out and check if it has a value.

Member Avatar for carlodglozada
0
102
Member Avatar for romy_fb

$_SESSION is a super-global variable you could use to store temporary data. It is an associative array and 'views' indeed could be said as an index. Instead of having numeric values as indexes as in normal arrays, in associative arrays you could have words as indexes. So in this case, …

Member Avatar for kekkaishi
0
117
Member Avatar for rayden150

In your php code, the if block that echos the numbers is inside the second for-loop while it needs to be outside.

Member Avatar for kekkaishi
0
109
Member Avatar for sanam_1

One easy way to do this is as below. [CODE] int[][] Board = new int[15][15]; for (int j = 0; j < Board.length; j++) { System.out.print((j < 10) ? " " + j + "\t" : j + "\t");} //use tab (\t) to introduce space with constant width. for (int …

Member Avatar for sanam_1
0
513
Member Avatar for nickcolb

Change type of variables between line 44 and 50 from int to float. If you want to cast from float to int then you should do like this [CODE] int numTens = 0; .. numTens = (int) change / 1000; //since change is float cast needed. [/CODE] hope this is …

Member Avatar for JamesCherrill
0
184
Member Avatar for cliffcc

I don't think if its possible to generate popups with only PHP. You can use Javascript to achieve this.

Member Avatar for epicrevolt
0
164
Member Avatar for ToXSiK
Member Avatar for Kadafiz

You could manipulate string to see if it contains letter 'V' at 10th position (9th if you consider that the string starts with index 0, 1... and so on). One way to achieve your goal is, [CODE] $num = "123456789V"; if(strlen($num) == 10){ echo "OK. length is OK."; //assuming that …

Member Avatar for lyrico
0
2K
Member Avatar for Aser Gado

It seems that the error lies in your database.php file. So, perhaps you could include the source of that file.

Member Avatar for diafol
0
115
Member Avatar for churva_churva

One way to do it is to have a main container. This could be a div or a table. Then set the border using css. Eg: [CODE] <div id="main" style="border: 1px solid #333333"> <!-- inline styling. you could also do this in a separate css file. --> .... </div> [/CODE] …

Member Avatar for kekkaishi
0
96
Member Avatar for WolfShield

Knowing about JMenus might help you. Here is Sun's/Oracle's tutorial on how to use menus. [URL="http://download.oracle.com/javase/tutorial/uiswing/components/menu.html"]http://download.oracle.com/javase/tutorial/uiswing/components/menu.html[/URL] Hope this helps.

Member Avatar for WolfShield
0
105
Member Avatar for tape enterprise

line 11, closing bracket is missing. [CODE] //mysqli_select_db($this->link, $this->db_database mysqli_select_db($this->link, $this->db_database); [/CODE] line 19: try changing it from [CODE] //$sql = "select * from '$table'"; //TO $sql = "select * from $table"; //without single quotes. table name do not need to be enclosed with single quotes. //OR $sql = "select …

Member Avatar for tape enterprise
0
88
Member Avatar for moonL!ght

try changing line 15 to thia [CODE] <!--<img border="0" src="/images/2173453.jpg" alt="koria girl" width="304" height="228" />--> <img border="0" src="images/2173453.jpg" alt="koria girl" width="304" height="228" /> [/CODE]

Member Avatar for fpsasm
0
144
Member Avatar for hairpull

ur convertIntegerToWords(int number) function should return numWordString. (if number is 1 nuwWordString would be one. also for each of the case add break so that it would break as soon as numWordString as a value eg: [CODE] case 1: numWordString = "one; break; case 2: numWordString = "two"; break; //ans …

Member Avatar for jon.kiparsky
0
128
Member Avatar for carlitosway17
Member Avatar for mKorbel
0
191
Member Avatar for raghujosh

if i may add in, a couple of points. (refering to ur original code) 1- [CODE] $con = new mysqli("internal-db.s110820.gridserver.com","db110820","Solved!2$$"); //is only the connetion. the database needs to be selected $con->select_db("dbname"); [/CODE] 2- the way u've coded mysqli_stmt::num_rows wont work i think. u first need to store the result if …

Member Avatar for raghujosh
0
120
Member Avatar for MDanz

if u want to count the number of rows a mysql result set carries, you could use mysql_num_rows function. [CODE] $sql = "SELECT * FROM table WHERE id={$id}"; $number_of_rows = mysql_num_rows($sql); [/CODE]

Member Avatar for kekkaishi
0
81
Member Avatar for lttleastig

encrypt the password received from input before comparing. that is for eg: [CODE] $pass = $_POST['pass']; //assumed u r using post $pass = encrypFunction($pass); //assumed that u r using a function to encrypt the password and that the function is, say, encrypFunction($s); //$pass is now encrypted so now ud be …

Member Avatar for lttleastig
0
119
Member Avatar for Tehim

echo the actvtn code within the block to check.. u know just in case. [CODE] //THIS SEEMS TO BE WHERE THE ERROR IS $get_user_data = mysql_fetch_array($check_id); echo $get_user_data['activationcode']; echo $activationcode; if($get_user_data['activationcode'] != $activationcode){ $final_report.="Sorry that activation code seems to be invaid."; }else{ //THIS SEEMS TO BE WHERE THE ERROR IS^ …

Member Avatar for Tehim
0
370
Member Avatar for MDanz

i wish to help u with this but im having a bit of difficulty understanding ur problem. [QUOTE]i've been doing while loops for this problem [/QUOTE] what exactly is '[I]this problem[/I]'? are u trying to retrieve a set of '[I]boxes[/I]' from a mysql database and arrange them in order?

Member Avatar for diafol
0
109
Member Avatar for jclawson000

[CODE] System.out.print(a[i][j] + ' '); [/CODE] change to [CODE] System.out.print(a[i][j] + " "); [/CODE] and see.

Member Avatar for jclawson000
0
2K
Member Avatar for anthonyjpv

Top coder [[URL="http://www.topcoder.com/tc"]here[/URL] Uva Online Judge [problem archive [URL="http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8"]here[/URL] there are many such.

Member Avatar for peter_budo
0
149
Member Avatar for Oppression

u needa return the sorted array from the rotateRight function [CODE] public static int[] rotateRight(int[] array){ [/CODE] and at the end of the function [CODE] return array; [/CODE] and in the main [CODE] list = rotateRight(list); [/CODE] hope this helps

Member Avatar for ztini
0
113
Member Avatar for pearll

try this [CODE] //if('$choicetext'!="" && '$verb'=="other"){ if($choicetext !="" && $verb=="other"){ //see the difference? variables are without the single quote [/CODE]

Member Avatar for Shanti C
0
81
Member Avatar for Clandestinexxx

referin to ur sample tree the following would work i suppose. [CODE] int height = 9; int currentRow = 1; //current row count for iterating int stCount = 1; //star count for each row while(currentRow <= height){ int checker = 1; //to keep check of already printed star if(currentRow == …

Member Avatar for ztini
0
192
Member Avatar for Transcendent

if i may add in, can't u just do this? [CODE] public static void main(String[] args){ int sum=0; for(String s: args){ sum += Integer.parseInt(s); } System.out.println("Sum: "+sum); } [/CODE]

Member Avatar for Transcendent
0
815
Member Avatar for anthonyjpv

if u want to convert string to int [CODE] String s = "2"; int x = Integer.parseInt(s); [/CODE] but u could directly get the int value using nextInt [CODE] Scanner sc = new Scanner(System.in); int x = sc.nextInt(); //edited to assign sc.nextInt() to int x [/CODE] hope this helps.

Member Avatar for anthonyjpv
0
163
Member Avatar for kekkaishi

hi, i'm trying to manipulate dynamic textboxes using jquery such that when the value of the textbox_1 is, say, 'abcd' a new text box textbox_2 would be introduced and when the value of textbox_2 is again 'abcd' a third one is introduced and so on. ive managed to do this …

Member Avatar for kekkaishi
0
146
Member Avatar for Newskin01

maybe this could help. (ive assumed a sample scenario) [CODE] public class Orange { private String name; public void setName(String name){ this.name = name; } public String getName(){ return this.name; } public void remove(Orange o[], Orange o1){ for(int i=0; i<o.length; i++){ if(o[i].getName().equals(o1.getName())){ o[i] = new Orange(); } } } } …

Member Avatar for thekashyap
0
528
Member Avatar for Transcendent
Member Avatar for Smudly

may be use explode() to get the individual phrases in the search string and then re-build the query string for each of the phrases...

Member Avatar for Smudly
0
118
Member Avatar for nsam

select id from your table, order by id in descending order and give it a limit of 1.

Member Avatar for pritaeas
0
287
Member Avatar for Smudly

u could use strrpos function to identify the positions of the dots. but, i dont think a file would have two extensions. extension is the one that comes after the last dot no matter how many dots a file name has. if you already do not know about it, you …

Member Avatar for kekkaishi
0
72
Member Avatar for kekkaishi

hi, i've been trying, without success, to maintain the style of the text in a jTextPane when it is copied into the clipboard. what I want is to copy the text in a jTextPane with styles (eg: bold, italic) and to be able to paste it into MS WORD with …

Member Avatar for kekkaishi
0
108
Member Avatar for skank111

you gotta try yourself first. hint: you could use Euclid's gcd algorithm.... it goes like this, gcd(a,b) = gcd(b, a%b)

Member Avatar for kekkaishi
0
70
Member Avatar for Kimmelivim

you could may be do this [CODE]//do //{ System.out.print("Please enter your guess(1-1000): "); n = in.next(); if(isIntNumber(n)) num = Integer.parseInt(n); else num = 0; //} //while(!isIntNumber(n)); while(num != target) { if(num <1 || num >1000) System.out.println("Stupidity"); else if(num >0 && num <1000 && num > target){ System.out.println("Too high"); numberOfGuesses++; } …

Member Avatar for Kimmelivim
0
99
Member Avatar for J.M

[QUOTE=J.M;1026513]Hi There, I have had a look on the internet but not really been able to find the correct thing i'm looking for very easily, or at least not very well/easily explained. I am trying to create a Search Form for my website which has 2 fields. 1) A Postcode …

Member Avatar for Member 785068
0
197
Member Avatar for cane23

[QUOTE=cane23;1148182]i have a multiple select drop down menu where i select some courses however my problem is that i was to store the selected courses in an array for further use. i have tried creating an array but is is coming up empty. Can someone help me out here here …

Member Avatar for rajabhaskar525
0
85
Member Avatar for CFROG

[QUOTE=CFROG;1031315]Does anyone know of a php based forum that is easily customizable to work with an existing user base so that members don't have to register or sign in a second time when they access the forum? I heard that this is possible with phpbb3 but I haven't seen anything …

Member Avatar for CFROG
0
346
Member Avatar for Folaju

[QUOTE=Folaju;1031532]I have tested the query in phpmyadmin and it pulls back the expected results. so it not working in the code is beyond me[/QUOTE] If the connection is OK then try this. u said its workin on the test server, so can u recheck the database in ur server and …

Member Avatar for Folaju
0
206
Member Avatar for rouse

just thought id also add in a bit. remember that mysql fetch array returns only one row each time the query runs, first run returns first row of the mysql resource, the second run second row and so on and returns a false if there is no more... so the …

Member Avatar for kekkaishi
0
120
Member Avatar for jakx12

[QUOTE=jakx12;1025634]Ok so im building a level editor for this game. What the code i cant working does is, when the button is clicked it should get the selected cell from the jtable and set a value for it. However, for some reason I cannont get it working. Here is the …

Member Avatar for quuba
0
263
Member Avatar for unwanted_virus

come on man, there's no way someone can go thru all ur codes to understand ur problem. in light of the title, check out these links. [url]http://www.tizag.com/mysqlTutorial/mysqlupdate.php[/url] [url]http://www.tizag.com/mysqlTutorial/mysqldelete.php[/url] OR [url]http://www.w3schools.com/php/php_mysql_update.asp[/url] [url]http://www.w3schools.com/php/php_mysql_delete.asp[/url] OR [url]http://dev.mysql.com/doc/refman/5.0/en/update.html[/url] [url]http://dev.mysql.com/doc/refman/5.0/en/delete.html[/url] good luck.

Member Avatar for Will Gresham
0
103
Member Avatar for SKANK!!!!!

[QUOTE=SKANK!!!!!;1025318]i dont know why but sometimes i use the same exact thing ive used on other pages that it has worked for and it just doesnt work on the new page im working on. i have a table called users. with columns called username password and status why isnt this …

Member Avatar for SKANK!!!!!
0
114
Member Avatar for umairraja52

[QUOTE=umairraja52;1024844]Can PHP be the alternative for ASP.net, or it is different from other.[/QUOTE] it is different and, using PHP as an alternative for ASP is all up to you. i personally prefer PHP and it's been 6 years since i started using it and loving it ever since. :)

Member Avatar for kekkaishi
0
59
Member Avatar for JavaCode

[QUOTE=JavaCode;1024756]OK I'm making a script and I get this error and have no clue off have to fix heres the code all help is thanked: [CODE]import java.awt.*; import java.util.*; import java.util.List; import java.util.logging.Level; import javax.accessibility.*; import javax.swing.*; import org.rsbot.bot.Bot; import org.rsbot.script.*; import org.rsbot.script.wrappers.*; import org.rsbot.accessors.*; import org.rsbot.event.listeners.PaintListener; import org.rsbot.event.listeners.ServerMessageListener; import …

Member Avatar for kekkaishi
0
175
Member Avatar for Namibnat

[QUOTE=Namibnat;1024681]I am busy with a project for fun and I am finding it tricky to set balues for mysql queries. If I do the following: [CODE]function CalcPostByTime(){ include 'DB_connection.php'; $result = mysql_query("SELECT ztime FROM blogpost;");[/CODE] What is the simplest way to set an array, which will be a return value …

Member Avatar for kekkaishi
0
137
Member Avatar for dandixon

> Im very new to php, but im trying to create a bit of code that you type in the part number and quantity you want and it returns the part number and the word "limited" if its the same "not enough" if it's less than and "in stock" if …

Member Avatar for kekkaishi
0
156
Member Avatar for kekkaishi

Hi, ive been trying to assign a value to a variable from within the ActionPerformed method, but the value seems to be lost as soon as ActionPerformed method ends. here's the code [CODE] public class Log{ private JTextField user = new JTextField(10); private JPasswordField pass = new JPasswordField(10); private int …

Member Avatar for kekkaishi
0
1K

The End.