Shanti C 106 Posting Virtuoso

if your thread got solved , then mark it solved.

Shanti C 106 Posting Virtuoso

you just initialize session. no need to return it. As it is a global parameter, if once we set it, we can get the value in any page.
replace your line: 4 like this:

$_SESSION['PolicyNumberAdd'] = $PolicyNumber;

Then your code works.

Goodluck.

Shanti C 106 Posting Virtuoso

basename — Returns trailing name component of path.
http://php.net/manual/en/function.basename.php

Shanti C 106 Posting Virtuoso
$h=0;$m=0;$d=0;
$mystring= "47h9m10d";
$d=getValue($mystring,"d");
$h=getValue($mystring,"h");
$m=getValue($mystring,"m");

echo "d:".$d." , h:".$h.", m:".$m;	
function getValue($mystring,$type)
{
	$pos = strpos($mystring, $type);
	if ($pos !== false)
	{
	 	$v=substr($mystring, $pos-2, 1);
	 	if(is_numeric($v))
	 		$v=substr($mystring, $pos-2, 2);
	 	else
	 		$v=substr($mystring, $pos-1, 1);
	}
	return $v;
}

But this works only for 2 digit values like '99h99m99d' not for '100d100m100h'.
For this change the above code accordingly.

Shanti C 106 Posting Virtuoso

then post your code...

Don't put the above code in between php tags.

Shanti C 106 Posting Virtuoso
<table border=1>
<tr>
<td>LOAN NO</td>
<td><?php=$title?></td>
</tr>
<tr>
<td>NAME</td>
<td><?php=$title1?></td>
</tr>
<tr>
<td>ADDRESS</td>
<td><?php=$title2?></td>
</tr>
.
.
.
.etc
</table>
Shanti C 106 Posting Virtuoso
Shanti C 106 Posting Virtuoso

AJAX is not a programming language.
We can't develop a project based on only ajax.
Its a technique for creating fast and dynamic web pages(in any language).
Its a additional skill that every web developer must have knowledge.
It is not more than 1 or 2 weeks to learn this completely.

Main intention of AJAX is : can communicate with server with out re-loading the page.

Good luck.

Shanti C 106 Posting Virtuoso

You can't help someone get up a hill without getting closer to the top yourself.
- H.Norman Schewarzkopf.

Shanti C 106 Posting Virtuoso
Shanti C 106 Posting Virtuoso
Shanti C 106 Posting Virtuoso

You just write all your textbox properties in css file like:

.class1{
font-weight:normal;
}
.class2{
font-weight:bold;
}

You can change your textbox in php like:

if(something)
{
$style="class1";
}
else
{
$style="class2";
}

then use this class for your text box like:

<input type="textbox" name="test" class="<?=$style;?>" />
Shanti C 106 Posting Virtuoso

then try this:

see this if you want is from data base:
http://www.plus2net.com/php_tutorial..._down_list.php

Shanti C 106 Posting Virtuoso

no, we must have to give full file name with extension:
http://www.jsptube.com/jsp-tutorials/jsp-include-directive.html

Shanti C 106 Posting Virtuoso
Shanti C 106 Posting Virtuoso
Shanti C 106 Posting Virtuoso

see this if you want it in a static way:
http://www.weberdev.com/get_example-4398.html

see this if you want is from data base:
http://www.plus2net.com/php_tutorial/php_drop_down_list.php

or if you want it with out reloading page go for ajax.

Shanti C 106 Posting Virtuoso

You can get more samples if you search google.
Any way find this script and change it according to your requirement.
http://www.toknowmore.net/e/1/javascript/javascript-disable-enable-text-box.php

Shanti C 106 Posting Virtuoso

change your line to:

echo "<input type='checkbox' name='results'>" . $result . "";

and then validate like this :

var total=0;
for(var i=0; i < document.form1.results.length; i++){
if(document.form1.results[i].checked)
total =total+1;
}
if(total!=document.form1.results.length)
alert("Please select all")
Shanti C 106 Posting Virtuoso

if you want recently inserted id then,
you can try this:

$id=mysql_insert_id();

check this:http://php.net/manual/en/function.mysql-insert-id.php

Shanti C 106 Posting Virtuoso

Where you have chkKeyExists am i rite in thinking that would be another function that would check query db and see if the key exists in db? just want to check on that. If so i will get onto it now.

Yes, chkKeyExists is function where we check that key already exists in data base or not.

Shanti C 106 Posting Virtuoso
function getKey()
{
  $key=generateKey();
  if(!chkKeyExists($key))
  {
    return $key;
  }
  else
  {
    getKey();
  }
}
Shanti C 106 Posting Virtuoso

ya, its is MySQL server IP.
or ask your hosting people , they will give you all these details.

Shanti C 106 Posting Virtuoso

give your live database settings (where your database is located):
host,db username,db password,dbname.
give these correct details in the page where you have written connecting data base code.

Shanti C 106 Posting Virtuoso

Did you change data base settings ?

What did you used for php tags: whether it is <? ?> or <?php ?> .
For this <? ?> , we need to enable short tags in your server.

Is your website is having index.php or not?

Where did you uploaded your code (any sub folder)?

check for these basic validations.

Shanti C 106 Posting Virtuoso

my voice only..

Shanti C 106 Posting Virtuoso

Lays Tomato Tango

Shanti C 106 Posting Virtuoso

Be the first to the field and last to the couch.

Shanti C 106 Posting Virtuoso

what kind of field should i use in the mysql database?

You can do upload images functionality in two ways:

1. You store your image in folder and then save that path in database.

2. Directly you can store image in database.

First way is always recommended. Because if you store your image in database then it will become huge and slow.

For the first way, db column data type would be BLOB,TINYBLOB,MEDIUMBLOB,LONGBLOB .
For the second way, db column data type would be varchar or text .

Shanti C 106 Posting Virtuoso

call parent refresh before closing child window like:

window.opener.refreshdash(1);

or something like

window.opener.document.location.href = window.opener.document.URL;
window.close();
Shanti C 106 Posting Virtuoso

correct this line to (==) if ($username == 'letmein') { = means assignment operator.
== means comparision operator.

Shanti C 106 Posting Virtuoso

trying to import and export jsp projects in eclipse..
but still getting some errors.

Shanti C 106 Posting Virtuoso
Shanti C 106 Posting Virtuoso

i found something...
that we can directly call onchange event for hiiden filed in html
check the following link for more details:
http://stackoverflow.com/questions/1003053/does-html-hidden-control-have-any-events-like-onchange-or-something

Shanti C 106 Posting Virtuoso

Two points have to be noted here:

1. if you use else if conditional loop then it will go for only on condition for your input,then other matched inputs will not return strings.
2.decide your input manner, whether it is in comma separated or space separated or some thing else. Based on this explode an array called $programs using php explode function.

and also:

-> Use in_array() instead of array_search for searching string in an array.
-> remove while loop, no use here.

based on the above things i have changed your code accordingly.try with the following:

<?php
function check_programs($input)
{
		$programs = explode(" ", $input);
		$return_string = '';
		if(in_array('ma', $programs) == true){
			$return_string .= "Maya, ";
		}if(in_array('ps', $programs) == true){
				$return_string .= "Photoshop, ";
		}if(in_array('ai', $programs) == true){
				$return_string .= "Illustrator, ";
		}if(in_array('xn', $programs) == true){
				$return_string .= "xNormal, ";
		}
		if(in_array('mm', $programs) == true){
				$return_string .= "MatchMover, ";
		}
		return $return_string;
		
}
echo $string1=check_programs('ps xn');
?>

If your requirement not matches this come up with clear information.

thanks.

Shanti C 106 Posting Virtuoso

by url rewriting (help of .htaccess file).
read articles on this topic.

Shanti C 106 Posting Virtuoso

if you are listing all clients names from members table then pass member table id as parameter in java script on click function, which is not difficult.
like

<a href="javascript:showuser('<?php=$clicnt_id;?>');"><?php=$client_name;?></a>

The $client_id and $client_name are the variables contains proper values fetched from database table.

If this is not your requirement then post your code or come up with clear information.

Shanti C 106 Posting Virtuoso

If you want to update a row in your table , then come up with that table's primary key.
based on that id you can update your table and refresh that page which contain table data.
Means:
add this line after your hearder in line number 25 : <td bgColor="#008080"><font color="#ffffff"><b>Edit</b></font></td> and also insert this line after line number 52: <td bgColor="#ffff98" vAlign="top"><a href="editpage.jsp?edit_id=%=rst.getString("id")%>">Edit</a></td> then in editpage.jsp:
this page contains text boxes to enter new data, if we clicks edit link then it will go for update query some thing like : query="update registration set name=requert.getParameter("name") etc where id=requert.getParameter("id")"; After updating your query then redirect to main table data page.
then you can see edited values..

If your requirement is not this, then come up with clear information.
thanks.

Shanti C 106 Posting Virtuoso

i won't see what i have done, I only see what remaining to be done.

Shanti C 106 Posting Virtuoso

trying left joins in mysql

Shanti C 106 Posting Virtuoso

if if($critiria=="epitheto_iatrou") this is true, then
how would the following become true.. $sql="SELECT * FROM doctors WHERE epitheto='$critiria'"; if $critiria="epitheto_iatrou" then epitheto==epitheto_iatrou , this never become true..

change your code into accordingly..

Shanti C 106 Posting Virtuoso

:: is for referencing static properties or methods of a class. -> is for referencing instance properties and methods.
check line 4 for static is missing in first example.

Shanti C 106 Posting Virtuoso

put ob_start(); in the first line of your page..

Shanti C 106 Posting Virtuoso

you cannot shake hands with a clenched fist.
- Indira Gandhi.

Shanti C 106 Posting Virtuoso

mark a thread if it gets solved.
don't start multiple threads for one question.
choose appropriate forum to start a new thread.
search forum before start a thread.
use code tags to post your code in a thread.
don't do spamming.
don't post website links for ranking.

all the best.

Shanti C 106 Posting Virtuoso

for error 1 : you need to close while loop brace }.
for error 2 : switch case ends in line : 304. But you have written default in line no : 345. So remove unexpected default there. or re arrange your switch cases.

Shanti C 106 Posting Virtuoso

use ajax function on drop down onchange..
read some ajax tutorials..

Shanti C 106 Posting Virtuoso

hi,
i checked your code,
your facility field contains 17,16,14,15.
Means these values are not in sorted order. that is the problem..
sort the array while inserting the facility column.

why because mysql IN() function works based on binary search.
binary search needs to be searched array in sorted manner.

Shanti C 106 Posting Virtuoso

file uploads in java.
check this link.

Shanti C 106 Posting Virtuoso

What to do?

When you see a post containing this Russian spam (or any spam for that matter), click the "flag bad post" button next to it and type something creative.

ok, Sure..