|
You probably don't have the MySQL module or extension loaded in PHP. You need to run phpinfo() on your page to check if it's loaded.
[EDIT]
You really need to show the connect code, version of PHP and if your running in windows or Linux for more information.
sample code for connecting
$connect=mysql_connect("dbserver","dbuser","dbpassword") or die("Unable to Connect");
if your running on a linux server using SELinux, trying to connect to a remote server, then you need to use the SETBOOL command to give permission for http to use network connections
modified 13-Dec-13 18:50pm.
|
|
|
|
|
I feel that there is some problem in your connection of database. Check your database connection.
|
|
|
|
|
No - undefined function means you've never gotten through the .php code execution. It hasn't even tried to find the database.
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "As far as we know, our computer has never had an undetected error." - Weisert | "If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
Hello,
can anyone help me , i have to make my final year live project which is to develop a Web phone.
please explain me what actually i have to do ? from where should i start? and can make it using JavaScript and html5 ?
|
|
|
|
|
|
Hi All,
I am executing the .cmd in a html page with the below code.
<script language="JavaScript" type="text/javascript">
MyObject = new ActiveXObject("WScript.Shell")
function Runbat()
{
MyObject.Run("\"C:\\Users\\XXX\\Desktop\\XXX\\Scripts\\XX XX Groups\\X.cmd\"");
}
I have hosted this code in iis 7 for intranet. It works fine if i browse it on the same system.
But when i open the url in another system and click the button which runs the cmd file, it give error
"Message: The system cannot find the file specified."
Any suggestion will be appreciated.
Thanks.
|
|
|
|
|
So you think that if I browse to your web site I should be able to run x.cmd on YOUR machine, that is where the file lives.
You cannot magically run x.cmd om MY computer, you have to convince me to download x.cmd from your server and as I am not a total idiot that would never happen.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I want to execute the file on the server not on the client machine, but hen i click on the button from client machine it gives file not found error(i think it is looking for the file in the client machine, which is not my need. It should excute on the server. . And i have setup for intranet.
|
|
|
|
|
Vishalsb wrote: It should excute on the server
And then you write the code in javascript a CLIENT side scripting language - write the method in our c# code behind so it can execute on the server.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Public Function GetMaxSerialNumber(ByVal docType) As Int32
Dim db As Database = DatabaseFactory.CreateDatabase("igrwebConnectionString")
Dim sqlCommand As String = SP_UPDATE_DOCUMENTDETAILS
Dim dbCommand As DbCommand = db.GetStoredProcCommand(sqlCommand)
db.AddInParameter(dbCommand, "@operationType", DbType.String, "R")
db.AddInParameter(dbCommand, "@cType", DbType.Int64, docType)
Dim SrNo As Integer = db.ExecuteScalar(dbCommand)
Return SrNo + 1
End Function
The above code is giving an exception at db.ExecuteScalar(dbCommand)
Error is
ExecuteScalar requires the command to have a transaction when the connection assigned to the command is in a pending local transaction. The Transaction property of the command has not been initialized.
Please Help as i am new to enterprise library
|
|
|
|
|
As the exception says you need to instantiate a transaction in your code (which you aren't doing at this moment). That will fix your issue.
|
|
|
|
|
Hi all,
I want to show a video to the clients, the video is on youtube but youtube website is blocked in some countries.What should I do to make those people able to watch the video.Do I have to consider two different links one for youtube and one for another website?
Is there any code that can identify the video would n't be displayed for some certain users and automatically direct the user to another website?
Thanks
|
|
|
|
|
|
Usually this is handled at the client side with proxy servers.
Users throughout the world in countries with restricted internet access use proxy servers to get around the restriction because the data passes through an unblocked intermediate webserver.
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "As far as we know, our computer has never had an undetected error." - Weisert | "If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
Hi,
I would like to ask how can I use a $_SESSION["domain_name"] with window.location so this:
$('#btnBizHome').click(function() { window.location = 'passwordreset'; });
will look like this:
$('#btnBizHome').click(function() { window.location = $_SESSION["domain_name"] + 'passwordreset'; });
How can I do that?
Thanks,
Jassim
Technology News @ www.JassimRahma.com
|
|
|
|
|
Hereafter please post all your PHP questions in PHP forum[^](which is suitable one).
Thank you.
|
|
|
|
|
Your twelfth question in as many days. Don't you think a bit of learning would be of benefit?
Veni, vidi, abiit domum
|
|
|
|
|
Try this out
$('#btnBizHome').click(function() { window.location = <?php echo $_SESSION["domain_name"] ?> + 'passwordreset'; });
|
|
|
|
|
I am trying to have a share feature for the current page in my project but I am getting:
An error occurred. Please try again later.
can any one help please..
here is the page where you can try to share on facebook (using the Select an action) button:
http://www.xoompage.com/profile?id=347692ca-47a8-11e3-bea0-782bcb3e3838[^]
and here is the href for the facebook share:
https://www.facebook.com/dialog/feed?app_id=256274477853888&display=popup&caption=&link=&redirect_uri=
Technology News @ www.JassimRahma.com
|
|
|
|
|
Can You let me know how your share need to be..?
For a basic share it is very easy you can give image title etc in the below code
$imageforfb ="Some image path";
$titlefor_fb="Some title for the page";
encodeURIComponent(location.href) = will automatically get the url of ur page
<a href="#" class="facebook social-provider-icon"
onclick="
window.open(
'http://www.facebook.com/sharer/sharer.php?s=100&p[url]=' + encodeURIComponent(location.href) + '&p[images][0]=<?php echo $imageforfb; ?>&p[title]=<?php echo $titlefor_fb; ?>',
'facebook-share-dialog',
'width=626,height=436');
return false;">
</a>
Just use this
|
|
|
|
|
Have a look at this link.
|
|
|
|
|
If you see this link now:
http://www.xoompage.com/profile?id=347692ca-47a8-11e3-bea0-782bcb3e3838[^]
the dropdown button is working fine but when I click on or MouseOver it and when the list appears it will move some elements on the page (e.g. profile photo).
I contacted the developers who said it's because the dropdown is inside a td and I should take it our of the td
Is there any solution? taking it out of the td is a major change.
I want the list to appear over the content without having to move other elements.
Please help..
Thanks
Jassim
Technology News @ www.JassimRahma.com
|
|
|
|
|
HELLO
I am new to PHP and web based environment (noob), previously i was facing a problem with my code which is i cannot update the mysql table row when checkbox is checked... the idea is when checkbox is checked, then the value is +1. This is somehow likely to update the row on the table..
here is the code: (sorry if the code are messy because i also find the code in internet and edit it)
PHP code:
<html><body>
= mysql_connect(= array(= $_POST[= array();
= 1;= 0;= "UPDATE admin SET candidate1=candidate1 +1 WHERE candidate = candidate1.
mysql_query($sql,$con) or die('<br/>Error reading database: '.mysql_error($con));
header("
</body></html>
AND HERE IS THE INDEX:
VotePage.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>VOTING PAGE</title>
<script language="JavaScript" type="text/javascript">
function checkTheBox() {
var flag = 0;
for (var i = 0; i< 4; i++) {
if(document.form1["candidate[]"][i].checked){
flag ++;
}
}
if (flag != 5) {
alert ("PLEASE SELECT 5 CANDIDATE ONLY");
return false;
}
return true;
}
</script>
</head>
<body>
<center>
<div class="checkbox" data-toggle="false" data-min="2">
<table width="800" height="600" bgcolor="#28b6ee" border="0" align="center">
<h1>LIST OF CANDIDATE</h1>
<form name="form1" method="Post" action="CheckCandidate.php">
<tr width="800" height="600" >
<td width="160" height="50">
<img src="Voter.jpg" alt="Vote 1" align="top">
<input type="checkbox" name="candidate[]" value="1" />
</td>
<td width="160" height="50">
<img src="Voter.jpg" alt="Vote 2">
<input type="checkbox" name="candidate[]" value="1" />
</td>
<td width="160" height="50">
<img src="Voter.jpg" alt="Vote 3">
<input type="checkbox" name="candidate[]" value="1" />
</td>
<td width="160" height="50">
<img src="Voter.jpg" alt="Vote 4">
<input type="checkbox" name="candidate[]" value="1" />
</td>
<td width="160" height="50">
<img src="Voter.jpg" alt="Vote 5">
<input type="checkbox" name="candidate[]" value="1" />
</td></tr>
<tr>
<td width="160" height="50">
<img src="Voter.jpg" alt="Vote 6">
<input type="checkbox" name="candidate[]" value="1" />
</td>
<td width="160" height="50">
<img src="Voter.jpg" alt="Vote 7">
<input type="checkbox" name="candidate[]" value="1" />
</td>
<td width="160" height="50">
<img src="Voter.jpg" alt="Vote 8">
<input type="checkbox" name="candidate[]" value="1" />
</td>
<td width="160" height="50">
<img src="Voter.jpg" alt="Vote 9">
<input type="checkbox" name="candidate[]" value="1" />
</td>
<td width="160" height="50">
<img src="Voter.jpg" alt="Vote 10">
<input type="checkbox" name="candidate[]" value="1" />
</td>
</tr>
</table>
</div>
<div>
<table align="center">
<tr >
<td align="center" width="800" height="50">
<input type="Submit" name="Submit" value="Submit" onclick="checkTheBox();" />
</td>
</tr>
</table>
</div>
</table>
</div>
</form>
</center>
</body>
</html>
I'll BE GLAD IF THERE IS SOME ONE CAN SPEND SOMETIME TO LOOK AT THIS PROBLEM..THANK YOU
modified 20-Nov-13 0:45am.
|
|
|
|
|
There are a lot of mistakes, some trivial, some logical, some syntatic, and there are others just did not make sense. Just to mention a few:
for the html part:
1. The values of checkboxes are all 1, in that way, we would not be able to know which ones are being voted.
2. The checkTheBox function only check up to 5 selections but there are 10 checkboxes and yet the subsequent code that followed is suggesting that one can only vote exactly 5 candidates. I am confused.
3. ...
for the php part:
1. The $values is never used after the foreach.
2. The sql statement does not make sense.
3. The header is incomplete and in the wrong place.
4. ...
May I take a look at the database table admin, what are the fields and their data types?
I will try to suggest sometime if it is not too time consuming.
modified 20-Nov-13 12:29pm.
|
|
|
|
|
Did you try with the checkbox value="true" ?? i think it should be working if this is the only problem of your code...
|
|
|
|