- Interests
- I love to do programming.
46 Posted Topics
Re: Agree with Max_power_up... Just do one addition in case of dummy data , in $msg array along with message also put status and its value as fail or any other related word different from "Complete" | |
Hi, I am working on project Signature Based IDS. For that reason I need to install libpcap on my machine. I have problem in installing.I have libpcap source directory. as I give command # ./configure I found following error configure: error: Your operating system's lex is insufficient to compile libpcap. … | |
Re: In php we can use explode function, in that use "\n" as delimeter. It will give you array of lines, traverse through each element and append the character you want to append except the last element of the array. Now impload array using implode function. | |
Re: You can check this line, here is syntax error render("modifypass-form.php", ["title" => "Reset Password"]); 1)Square bracket ( [ ,]) 2)=> Please check your render function second argument. | |
Re: you can handle this kind of scinario using flag variable. I have written logic from what I understood from your question. flag =false while(read row one by one) { if (flag ==false) { read row first way flag =true; } else { flag =false; read row second way concat start … | |
Re: You can try this after connection made to mysql server mysql_query("set names 'utf8'",$connection); I hope this should work. | |
Re: Yes you can do it. Just you need to decide where to place seprator(here COMMA in your case) and New Line character "\n". or ofcourse as AndrisP suggested above you can do it using JOIN in a single query. | |
Re: I think you might have resolved this, but if not then problem is that you iterating one array into another and hence it gives multiple time result. Actully both array contains same number of values. I mean logically first record dependents[0]="1st dependant Name" age[0]="1st dependant age" similarly second dependents[1]="2nd dependant … | |
Re: Above solution is correct, I would like add more to it we can add "order by tablename.col1" | |
Re: If you are going to use value from column 'QUERY', then there will not be any problem. Just make sure that column name and table name are proper. In php write a code to select which query you want to execute and pass it to the mysql_query function. | |
Re: Yes as @imthwee said there are many ways to do it. One way is to keep Submit button disable unless Print button is clicked. Or Another way is to disable print button after click Print button, and check on click of Submit button wether Print is disabled (i.e. Print is … | |
![]() | Re: "interpolation to build the array index" By this sentense I think author may be trying to say that he is forming a index value using variable $number. $age["Clone$number"] He is joing string "Clone" and value from variable $number to form new more index value like $age[Clone1] $age[Clone2] $age[Clone3] That is … |
![]() | Re: Indexed arrays have the numeric value in the index $array[0]="XYZ"; $array[1]="25"; $array[2]="United States"; $array[3]="Football"; where as Associative arrays have the text value (key) in the index $array['Name']="XYZ"; $array['Age']="25"; $array['Country']="United States"; $array['Game']="Football"; It depends on person and the logic he want to build where he want to use the array. Suppoese … ![]() |
Re: Yes @pritaeas is right. It may be failing because one of the value contains a single quote or special character. Did you use mysqli_real_escape_string on the values you are passing to the query before paasing it to the query? | |
Re: I assume that the number of question equal to number of answesr You can do this way save your question and answer in txt or csv file and keep it tab seprated. Like FTP*<tab>*File Transfer Protocol*<tab>*Force Through Privately*<tab>*File Through Protocol*<tab>*File Test Protocol You can use any seprator like " | … | |
Re: I am agree with @diafol. You should use full tags like <?php .... ?> or you can check this in configuration <? ?> // short tags, need short_open_tag enabled in php.ini | |
Re: I am not used to with Opencart. But when I google it I found that automatic url rewriting can be done using "RewriteRule" in .htaccess file. | |
Re: @paulkd is right. It may be the problem of history/cacheing of browser. You can try by removing history from browser. | |
Re: I am totally aggree with function made by @cereal. You can use that. In addiotion to that function you can check $key. If key equal to "Vegetables" you can display value of "Vegetables" ![]() | |
Re: if ($active == '1') { ?> <input type="checkbox" class="active" name = "active" id="active" value="1" checked = "checked"> <?php } else { ?> <input type="checkbox" class="active" name = "active" id="active" value="1"> <?php } ?> Please Use above snippet. Also in your code snippet I found <input type="checkedbox"... For check box it … | |
Re: You can use limit in a query. And pass accordingly for each page. I am not sure but for pagination pupose limit will help you. ![]() | |
Re: If $session->username contains text and may contain special character also Please try with mysql_real_escape_string before passing $session->username to a query. | |
Re: I tried your both query. It works fine. [QUOTE=jacob21;1533968]SELECT * FROM admin where company='test & test' I am running this query but getting error due to [B]&[/B].while printing Its showing SELECT * FROM admin where company='test ',not accepting & in sql query Can we run using & in query need … | |
Re: Hi, In what format your data is stored? is is databse? is it file?........ Please provide more information 1)if it is database use this [url]http://www.w3schools.com/PHP/php_mysql_select.asp[/url] or 2) if it is file [CODE]$url="http://www.example.com/filename"; $xmlData=file_get_contents($url);[/CODE] You will get file contents into this $xmlData variable. [QUOTE=Karthik_pranas;1491089]Hi All, How to read data from server … | |
Re: Hi , As you provide your problem on that basis I have created code snippet, Please change wherever necessary. This wil hep you and hope this is you want..... [CODE] <?php $con = mysql_connect("localhost","username","pwd"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("databaseName", $con); $sql = "SELECT CandidateID, … ![]() | |
Re: hi phaedrusGhost, You may use javascript.I am giving logic. 1)create one function in javascript it will have one argument function takeAction(int action) { if (action==0) { //Add button event or action } else if (action==1) { //delete button event or action } } 2)If I am not wrong You have … | |
Re: Hi First you will have to create gui(text fields and buttons) to get that details Like- Person Name- Email ID-: Comment-: On this form you will have buttons Save and Cancel. On click of Save button your form(form where that save button is) should be redirected to a little php … | |
Re: Hi, I did not get your question. but when we click any button we check its ActionEvent.getActionCommand().This function returns string on which button we have clicked.And based on that we make action i.e. write a code. For ex. I have button with text "Add" on it ,then in my function … | |
Re: Hi , I looked in your code. y did you wrote class CustomPanel inside admins? Please make sure where CustomPanel should be. I think it should be outside of admins class. One more question y did you keep your package name and class name same i.e. admins If you have … | |
Re: Hi, Are you storing data in array after retrieving from mysql. y? Please try this way ans see your output-- store it as string variable. If you have any doubt please let me know. | |
Re: Hi, I agree with " pritaeas " your code is write. I think only thing you will have to return query result to a function. I tried it. Your exec_query( $query ) should look like this. [QUOTE]public function exec_query( $query ) { return mysql_query($query, $this->connection ); }[/QUOTE] If you any … | |
Re: hi, you can use session to get your solution. Please refer this link [url]http://www.w3schools.com/php/php_sessions.asp[/url] I think this help you out. At very first you have to check is there any session exist or not.if there is any session exist with the name you given then do not show table else … | |
Re: [QUOTE=Aysa;1279999]hi guys i have to Write Square(n) function that prints a square of different sizes. The size of the square is given as input to the user. Please enter an integer value n: 10 *********************** * * * * * * * * * * * * * * * … | |
Re: [CODE=php]<?php include("connection.php"); //second query $resultnumber=mysql_query("SELECT *FROM curso where curso_name='informatica'"); $num_second=mysql_numrows($resultnumber); $x=0; while ($row=mysql_fetch_array($resultnumber2)) { $curso_name=mysql_result($resultnumber2,$x,"curso_name"); $curso_periodo=mysql_result($resultnumber2,$x,"curso_periodo"); $curso_disciplina1=mysql_result($resultnumber2,$x,"curso_disciplina1"); $curso_disciplina2=mysql_result($resultnumber2,$x,"curso_disciplina2"); $curso_disciplina3=mysql_result($resultnumber2,$x,"curso_disciplina3"); $curso_preco=mysql_result($resultnumber2,$x,"curso_preco"); } echo $curso_name; echo $curso_disciplina1; ?>[/CODE] First query found fine.in second query from where $resultnumber2 is coming If I am not wrong I think it should be $resultnumber. Please check … | |
Re: Hi You can write your code or foreach loop as follows.It works.If you have still query let me know [CODE] <?php error_reporting(E_ALL); ini_set('display_errors', true); $xml=@simplexml_load_file("http://www.ecb.int/stats/eurofxref/eurofxref-daily.xml"); if($xml) echo "Files Successfuly loaded <br />"; else echo "Error <br />"; foreach($xml->Cube->Cube->Cube as $cube) { foreach($cube->attributes() as $a => $b) { echo $a,'="',$b,"</br>"; } … | |
Hi All, I am exploring on file properties.Specifically I want to know about file icon and other. How does the process of file save is done when we create it first time? And where all properties get save. I want to change that icon file through code for any file. … | |
Re: Hi, I am not giving you in details.But I am giving you sudocode to do your code. 1)PLLWINDOW.PHP <?php /* Connect to databse*/ /* Retrive your information from databse.If empty i.e. first time dont show anything.If found any record show in whatever format you have close database connection. */ /*Write … ![]() | |
Re: Hi, There is problem with php syntax.You were using double quotes without worry of concatenation.Whenever you uses double quotes it should be properly ended and text should be enclosed properly. Also if you are using any column's datatype as varchar in a database please use single quotes to enclose values … | |
Re: > start quote: <?php $link = @mssql_connect("-", "-", "-") or die ("Server is down!"); $db = @mssql_select_db('-') or die ("Accout table is missing!"); function doesUsernameExist($name){ $exit = FALSE; $result = @mssql_query("SELECT * FROM Accounttable.. WHERE account='$name'"); if(mssql_num_rows($result) != 0){ $exit = TRUE; } else{ $exit = FALSE; } return $exit; … | |
Re: Hi Have you checked IE settings?Please check weather Javascript option is enabled or not? | |
Re: [QUOTE=shahidkohat;1090518]How to insert record in php using Ajax?[/QUOTE] I didnt get you.Can you explore in brief ? So I will try to help you. | |
Hi All, I am a student learning Advance networking. I am doing project on [B][COLOR="Green"]signature based intrusion detection system[/COLOR][/B]. For that I am searching for signatures.But I didnt get signatures. I want sample signatures.Please help me. Thanks in advance | |
Hello I am new user of coldfusion.I just started to learn coldfusion. I made one file with the name "1_2.cfm" Code : [code=coldfusion] <!--- Processing ---> <cfset myQuestion = "What is a variable?"> <cfset myAnswer = "Variables are named storage containers inside programming languages. Just think of variables as any … | |
Re: Hi, I m nt getting Ur problem. But U can retrieve a data from database. just write your database coonectivity code in <% connection code make a query get a result set %> Now your resultset have a data in jsp write textbox <input type="text" value='<%resultset.getString("columnname") %>' name="txt1" > | |
Re: instead of this <% String up = (String)session.getAttribute("myText"); %> try this <% String up = session.getAttribute("myText").toString(); %> The session attribute is of object datatype.so we have to convert it to string . | |
I have developed web application I m using java beans file to set the values when user login to the system. It set the values of the user. I uses that value in application Whenever the login code calls the beans values are set with new user. The existing login … |
The End.