Posts
 
Reputation
Joined
Last Seen
Ranked #4K
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
100% Quality Score
Upvotes Received
8
Posts with Upvotes
8
Upvoting Members
6
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
2 Commented Posts
1 Endorsement
Ranked #858
Ranked #630
~26.8K People Reached
Favorite Forums

65 Posted Topics

Member Avatar for kkasp

Hi, In functions.php -> retrieveEntries(). Before the statement [CODE]return $e;[/CODE] , use the following code to do the debug. [CODE]var_dump($e);[/CODE] You are getting the error coz the $e returned from the function is not an array. Also try to add some echo statements in the if{} else{} conditions in the …

Member Avatar for safety1g
0
395
Member Avatar for capton

What are you trying to do in this comparison ? [CODE]if(!($_SESSION['count']=$_POST['reg']))[/CODE] You might want to change that to [CODE]if($_SESSION['count']!=$_POST['reg'])[/CODE]

Member Avatar for capton
0
163
Member Avatar for davy_yg

You are getting that as an array probably because the following 2 input elements have the same name in your form. ( viz, name="gambar" ) [CODE]<td>Gambar</td> <td><input type="file" name="gambar"/></td> </tr> [/CODE] and [CODE]<input type="hidden" name="gambar" value="<?php echo $gambar['name']; ?>"/>[/CODE]

Member Avatar for davy_yg
0
212
Member Avatar for drewpark88

Hi, I don't see anything wrong in your code. However there is one small thing. I guess if there was already an email in the DB, then you wanted to return 1, else 0. But now it returns 0 if an email already exists, else 1. But my speculation is …

Member Avatar for drewpark88
0
161
Member Avatar for gunnerone

Check the following link to know more about how mysql_fetch_assoc() works. [url]http://in2.php.net/manual/en/function.mysql-fetch-assoc.php[/url] [CODE] $sql1 = mysql_query("SELECT equipmentid, description FROM equipment") or die(mysql_error()); //$numberofrows = mysql_num_rows($sql1); Not necessary in this case, but for you to know how to fetch the number of records returned. while($row = mysql_fetch_assoc($sql1)) { echo '<input type="checkbox" …

Member Avatar for as.bhanuprakash
0
127
Member Avatar for raf.fredi

Add another parameter to the data: part in your jquery function. There is no other way to know if user has clicked on Share since this is not a form element. [CODE]var DATA = 'status=' + status + '&share=true';[/CODE]

Member Avatar for Biiim
0
126
Member Avatar for 140fulton

Hi, In the first snippet where you are redirecting. [CODE]redirect("blank.php?".$_SESSION["id"]);[/CODE] I think you wanted it to be with id=$_SESSION['id'] [CODE]redirect("blank.php?id=".$_SESSION["id"]);[/CODE] Hope it helps.

Member Avatar for diafol
0
315
Member Avatar for tanu963

Check the following link. [url]http://www.php.net/manual/en/features.file-upload.post-method.php[/url] validate the $_FILES['userfile']['type'] to find the mime type of the uploaded file and save the file info in appropriate table. You can also save the files in different directories based on this information. The link also has some examples on handling the file upload.

Member Avatar for diafol
0
180
Member Avatar for Pravinrasal
Member Avatar for jonnyboy12

When you click on a submit button, only the values of that respective form elements will be posted on to the file specified by action="abcd.php" file in the <form> tag. In your case when you click on any other submit button say for ex: search1 , then only the element …

Member Avatar for diafol
0
214
Member Avatar for simplyhuman

That means you are sending output before calling the header() function in your script. Check for the following explanation from [url]http://php.net/manual/en/function.header.php[/url] [I]Remember that header() must be called before any actual output is sent, either by normal HTML tags, blank lines in a file, or from PHP. It is a very …

Member Avatar for diafol
0
105
Member Avatar for deraad

Hi, Below is the code with a small change. I have shifted the $shortest = -1 line inside the first foreach() loop. I hope it helps. [CODE] //$input = $_POST['input']; $input = "bleu,grun,yelow,integer,crout"; $input = explode(',', $input); $words = "yellow,green,grapes,blue,court"; $words = explode(',', $words); //$shortest = -1; Shift this inside …

Member Avatar for deraad
1
240
Member Avatar for FutureDev86

Below is the edited version of guessGame() function. Hope it helps [CODE]function guessGame() { var randomnumber = Math.floor(Math.random() * 51); do { var guess = prompt("Please enter a number between 1 and 50", "") if (guess > randomnumber) { alert("Guess lower!"); } else if (guess < randomnumber) { alert("Guess higher!"); …

Member Avatar for as.bhanuprakash
0
92
Member Avatar for Marauder

[CODE] <script type="text/javascript"> $(document).ready(function(){ $("p").click(function(){ var testy = $(this).text(); var testAreContent = $('#area51').val(); testAreContent = testAreContent+testy + '\n'; $('#area51').val(testAreContent); }); }); </script> [/CODE] Hi, A small change in the jquery script. This works fine. Hope this helps.

Member Avatar for as.bhanuprakash
0
442
Member Avatar for muralibobby2015

I hope the following script solves your problem. [CODE]<?php if(isset($_POST['clickhere'])) { $selected_values = $_POST['color']; foreach($selected_values as $key=>$value) { // Insert query comes here. echo "Insert Query - ".$value."<br />"; } $select_blue = (in_array('1',$selected_values)) ? "selected" : ""; $select_green = (in_array('2',$selected_values)) ? "selected" : ""; $select_red = (in_array('3',$selected_values)) ? "selected" : …

Member Avatar for diafol
0
1K
Member Avatar for loligator

The best way to deal with this is to make sure you store only one kind of apostrophe in your database no matter what the user enters. So before storing the value in the database do a str_replace() to strore appropriate apostrophe. Also in the search module, take the user …

Member Avatar for sneldog
0
231
Member Avatar for as.bhanuprakash

Hi All, I need to validate the telephone number entered by the user in a form. Following are the conditions. 1. The length of the string should be 10. 2. The first character should be ZERO. 3. Remaining 9 characters can be any digits from 1-9. I am using the …

Member Avatar for as.bhanuprakash
0
124
Member Avatar for logonchristy

say you have one.php where you will do the insert one.php [CODE]<?php . . . $insert_query = "insert into table1 (col1,col2) values ('val1','val2')"; mysql_query($insert_query); // Now get the of the above inserted row to some variable say $id echo "<script type='text/javascript'>window.open('http://www.abc.com/test/two.php?id=".$id."');</script>"; ?>[/CODE] Your two.php should have the code to retrive …

Member Avatar for moncy
0
239
Member Avatar for mrcniceguy

I couldn't notice anything wrong in the query. Did you check the result only for the second part like the following and get the results you expected ? [CODE] $checkz=mysql_query("SELECT DISTINCT poster FROM postcomment WHERE ((postid='$po') and (poster !='$user'))");[/CODE]

Member Avatar for mrcniceguy
0
375
Member Avatar for AdventDeo

[CODE]<?php if (isset($_POST['next'])) { /* * In order to see how your posted data looks like, use the following statement. * print_r($_POST['porid']); */ /* * Type 1 * Say you have 20 checkboxes and you have selected only 8 out of them, then only these 8 checkbox values will be …

Member Avatar for AdventDeo
0
184
Member Avatar for Pooja J.

Can you please quote for which particular case, the total goes wrong ? I tested by selected all the components with 1 quantity each and it gave me a correct total.

Member Avatar for as.bhanuprakash
0
251
Member Avatar for Pooja J.

When you have not selected any file then '$_FILES' will not have any values. So in the line.. [CODE]$file=time().$_FILES['file']['name'];[/CODE] the $file will only have the value returned by time() function, hence the above statement will be equivalent to [CODE]$file=time();[/CODE] Also please place your code within the [CODE][/CODE] tags.

Member Avatar for Pooja J.
0
108
Member Avatar for sitie_aniem

Can you please provide an example on what your input will be and the output expected from the function ?

Member Avatar for daryll1
0
724
Member Avatar for Pooja J.
Member Avatar for Pooja J.
0
816
Member Avatar for fatcat2010

The following will give you all the necessary details about the settings in php.ini [CODE]<?php phpinfo(); ?>[/CODE] To know more about register_globals go throught the following links [url]http://php.net/manual/en/ini.core.php[/url] [url]http://www.php.net/manual/en/security.globals.php[/url] The $$ syntax is nothing but variable variables in php. check out the following link [url]http://php.net/manual/en/language.variables.variable.php[/url]

Member Avatar for fatcat2010
0
181
Member Avatar for nathan2oo3

All you need to do is add a semicolon after the echo statement i guess... [CODE]<input name="rating" type="radio" value="1" <?php if ($rating==1) echo "checked";?>>1[/CODE]

Member Avatar for as.bhanuprakash
0
102
Member Avatar for SMHouston

The reason you are getting a new file created for each contact is coz of [CODE] $ContactFile = fopen("Open\\" . $LastName . ".txt", "w");[/CODE] For every contact if the lastname is different then it creates a new file. So please hardcode the textfile name. Also if you want all the …

Member Avatar for SMHouston
0
163
Member Avatar for niths

You cannot send any output to the browser before using the header() function. So put all the html content and your echo statements in your code after the header() function. If you still want to use the browser output before the header(), then you need to do something like this.. …

Member Avatar for niths
0
120
Member Avatar for virspy

In order to do that, you need to call your mail script at some prescheduled time. That can be done by setting up a cron job. I hope the following links will help you out to setup a cron for your php mail script. [url]http://drupal.org/node/31506[/url] [url]http://adminschoice.com/crontab-quick-reference[/url] [url]http://www.cyberciti.biz/faq/how-do-i-add-jobs-to-cron-under-linux-or-unix-oses/[/url]

Member Avatar for as.bhanuprakash
0
2K
Member Avatar for kuteinheart

I couldn't find any errors, try to put some alert messages in the function userChanged(); and check what output you are getting from xmlhttp.responsetext.

Member Avatar for as.bhanuprakash
0
118
Member Avatar for preetg

[CODE]$update_query = "UPDATE leave SET CL = CL - $clv_days where ecode=$ecode";[/CODE]

Member Avatar for preetg
1
131
Member Avatar for azegurb

[CODE]$query = "select count(*) from tablename where category='PHP'";[/CODE]

Member Avatar for xylude
0
104
Member Avatar for cane23

Say you want to write the include function in one.php which is in maindir/test/one.php . Suppose you want to include a file called two.php in maindir/someothertest/two.php . Then your one.php will be something like this.. [CODE]<?php include "../someothertest/two.php"; . . . ?>[/CODE]

Member Avatar for as.bhanuprakash
0
87
Member Avatar for niths

$sql = "SELECT * FROM `Users` WHERE `Username`='$Username' and `Password`='$Password'"; mysql_query($sql); $count = mysql_num_rows($result); In the above part you are missing the variable $result to recieve the resource returned by the mysql_query(). It should be .. $sql = "SELECT * FROM `Users` WHERE `Username`='$Username' and `Password`='$Password'"; $result = mysql_query($sql); $count …

Member Avatar for as.bhanuprakash
0
324
Member Avatar for ursrathika

The auto suggestion can be done using AJAX. To learn ajax you can go through the tutorials [url]http://w3schools.com/ajax/default.asp[/url]

Member Avatar for mrcniceguy
0
76
Member Avatar for mcastu
Member Avatar for mcastu
0
10K
Member Avatar for prem2

[CODE]<?php $arr = array("Zero","One","9884127128","98841254554","Four",array("Delimiter"),"9554565545","six",array("Delimiter"),"seven"); echo "<pre>"; print_r($arr); echo "</pre>"; foreach ($arr as $key => $value) { if (is_array($value)) { foreach ($value as $k => $v) { // echo $v."<br />"; } } else { echo $value."<br />"; } } ?> [/CODE] I hope this helps.

Member Avatar for prem2
0
69
Member Avatar for rpgwebsolutions

You can use the function: func_num_args(); Go through the following links [url]http://www.php.net/manual/en/function.func-num-args.php[/url] [url]http://php.net/manual/en/function.func-get-args.php[/url] [url]http://www.php.net/manual/en/function.func-get-arg.php[/url]

Member Avatar for OS_dev
-1
192
Member Avatar for rukshilag

Try to do the following way: [CODE] $sql="SELECT * FROM course_participant WHERE name like '%".$searchname."%'"; //Select Query $result = mysql_query($sql); //execute the query and get the result if(mysql_num_rows($result) > 0) //If there is a result, display it { echo "The search results are:<br />"; while ($row = mysql_fetch_assoc($result)) { echo …

Member Avatar for rukshilag
0
159
Member Avatar for tryphy

You can replace the code in the first few lines of every page withing <?php...?> with the following set of codes one.php [CODE] <?php session_start(); if (!isset($_SESSION['phone']) && isset($_POST['txt_phone'])) { $_SESSION['phone'] = $_POST['txt_phone']; } ?>[/CODE] two.php [CODE] <?php session_start(); if (!isset($_SESSION['name']) && isset($_POST['txt_name'])) { $_SESSION['name'] = $_POST['txt_name']; } if (!isset($_SESSION['email']) …

Member Avatar for cwarn23
0
133
Member Avatar for cane23

[QUOTE=brijendra1;1155459]how can open uploaded resume in php[/QUOTE] Hi brijendra1, Please start a new thread to post your questions.

Member Avatar for as.bhanuprakash
0
86
Member Avatar for ryan311
Member Avatar for JigneshManek

This is not the problem with upload. This is because of the permissions to access that directory or file. Go through the link below [url]http://www.daniweb.com/forums/thread60497.html[/url] You can also try to change the mode of the uploaded file using the php chmod() [CODE]chmod($upload_path,777);[/CODE] [url]http://php.net/manual/en/function.chmod.php[/url]

Member Avatar for JigneshManek
0
155
Member Avatar for preetg
Member Avatar for preetg
0
165
Member Avatar for prem2

Please check which is the php version you are using. The goto operator is available as of PHP 5.3.

Member Avatar for Zagga
0
975
Member Avatar for MickeyP123

Use it this way [CODE]$sql = "Select * from table1 where table1.field1 not like '%". $name%."' ";[/CODE]

Member Avatar for as.bhanuprakash
0
74
Member Avatar for dominique7

I think you can remove checkOK() for $name and $comments. Having a check for 'To' and the 'Headers' field of the mail() function may be sufficient enough.

Member Avatar for dominique7
0
165
Member Avatar for ravi0703

Once you have fetched the data from the database, check the length of the string using strlen() function and if that exceeds your desired length to show description in the front end, Split the string using chunk_split() function to the desired length and display that. [url]http://in3.php.net/manual/en/function.strlen.php[/url] [url]http://in3.php.net/manual/en/function.chunk-split.php[/url]

Member Avatar for logonchristy
0
128
Member Avatar for lisles

This is what i read in php.net [url]http://www.php.net/manual/en/features.file-upload.post-method.php[/url] [QUOTE] $_FILES['userfile']['type'] The mime type of the file, if the browser provided this information. An example would be "image/gif". This mime type is however not checked on the PHP side and therefore don't take its value for granted.[/QUOTE] so in your condition …

Member Avatar for lisles
0
96
Member Avatar for grisha83
Member Avatar for diafol
0
220

The End.