if your thread got solved , then mark it solved.
Shanti C 106 Posting Virtuoso
Shanti C 106 Posting Virtuoso
if your thread got solved , then mark it solved.
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.
$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.
then post your code...
Don't put the above code in between php tags.
<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>
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.
You can't help someone get up a hill without getting closer to the top yourself.
- H.Norman Schewarzkopf.
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;?>" />
then try this:
see this if you want is from data base:
http://www.plus2net.com/php_tutorial..._down_list.php
no, we must have to give full file name with extension:
http://www.jsptube.com/jsp-tutorials/jsp-include-directive.html
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.
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
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")
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
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.
function getKey()
{
$key=generateKey();
if(!chkKeyExists($key))
{
return $key;
}
else
{
getKey();
}
}
ya, its is MySQL server IP.
or ask your hosting people , they will give you all these details.
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.
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.
Lays Tomato Tango
Be the first to the field and last to the couch.
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
.
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();
correct this line to (==) if ($username == 'letmein') {
= means assignment operator.
== means comparision operator.
trying to import and export jsp projects in eclipse..
but still getting some errors.
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
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.
by url rewriting (help of .htaccess file).
read articles on this topic.
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.
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.
i won't see what i have done, I only see what remaining to be done.
trying left joins in mysql
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..
:: 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.
put ob_start(); in the first line of your page..
you cannot shake hands with a clenched fist.
- Indira Gandhi.
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.
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.
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.
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..