|
if there is free open source script like that
[^]
please give me link
|
|
|
|
|
|
Hi,
I am using the following url for my website admin:
http://www.mywebsite.com/site.admin
I would like to know how can prevent search engines from indexing the above url and anything under that folder e.g. site.admin/new.php, site.admin/edit.php, etc?
Thanks,
Jassim
Technology News @ www.JassimRahma.com
|
|
|
|
|
|
Hi,
I am using the following code to check if the $company_region is empty of NULL in the database but it's not working:
<?php if (!isset($company_region) || !empty($company_region) || !is_null($company_region)) { ?>
<tr>
<td align="left" valign="top" style="width: 100px;">State / City</td>
<td align="center" valign="top" style="width: 20px;">:</td>
<td align="left" valign="top"><?php echo $company_region; ?></td>
</tr>
<?php } ?>
I tried all the combinations but I am still getting the row show on the page with a blank State/City! The value in the database is NULL when I run the stored procedure on the database itself.
What can I do?
Thanks
Jassim
Technology News @ www.JassimRahma.com
|
|
|
|
|
You can check the data type for $company_region and check accordingly.
If it comes li null then you only need to check with null
if($company_region != NULL) {
// tasks you wanted
}
Please check the data type you get from the database.
Note:Can check it by var_dump($company_region);
Thanks
Debasis Behera
www.mindfiresolutions.com
|
|
|
|
|
Hi,
I am using the jqeury-file upload[^] to upload members photos but it's uploading the same file with the same format. However, I want to save all photoz in PNG format.
How can I do this on the server side? and is it enough to just rename JPG, GIF or BMP to PNG?
Thanks,
Jassim
Technology News @ www.JassimRahma.com
|
|
|
|
|
No, you cannot rename a file and expect it to be converted into a different type. You will need to provide a program to do the conversion.
Veni, vidi, abiit domum
|
|
|
|
|
I have a problem with this code. I am not sure if it's jquery's or php's problem.
I am using jquery and php to implement [Add More..]
first I'll list the code:
here is my jquery function:
<script type="text/javascript">
$(function() {
var counter = 0;
$('#add_industry').click(function() {
counter++;
var newField = $('#cboIndustry').clone().
attr({id: 'cboIndustry_' + counter,
name: 'cboIndustry[]'});
$('#container').append(newField);
});
});
</script>
then here:
<tr>
<td valign="middle">Industry</td>
<td valign="middle">:</td>
<td valign="middle">
<div id="container">
<select id="cboIndustry" name="cboIndustry" style="width: 100%" required>
<option value="" selected>[Industry..]</option>
<?php
$mysql_command = "CALL sp_populate_industry()";
$mysql_query = $mysql_connection->prepare($mysql_command);
$mysql_query->execute();
while($mysql_row = $mysql_query->fetch())
{
?>
<option value="<?php echo $mysql_row['industry_id']; ?>" <?php if ($mysql_row['industry_id'] == $company_industry) { echo 'selected'; } ?>><?php echo $mysql_row['industry_name']; ?></option>
<?php } ?>
</select>
</div>
</td>
</tr>
<tr>
<td valign="middle"></td>
<td valign="middle"></td>
<td valign="middle"><p id="add_industry"><a href="javascript:void(0)"><span>Add Industry</span></a></p></td>
</tr>
and in my php code I am inserting into mysql using:
if ($_POST['cboIndustry'])
{
foreach ( $_POST['cboIndustry'] as $key => $value )
{
$mysql_query = $mysql_connection->prepare('CALL sp_add_new_company_industry(:param_member_guid, :param_company_guid, :param_company_industry, :param_created_ip_address)');
$mysql_query->bindParam(':param_member_guid', $_SESSION["xoompage_member_guid"], PDO::PARAM_STR);
$mysql_query->bindParam(':param_company_guid', $company_guid, PDO::PARAM_STR);
$mysql_query->bindParam(':param_company_industry', $value, PDO::PARAM_STR);
$mysql_query->bindParam(':param_created_ip_address', $_SERVER['REMOTE_ADDR'], PDO::PARAM_STR);
$mysql_query->execute();
}
}
now the problem is... if I am adding two industries then only one will be inserted in the database and if I add 10 only 9 will be added.. why?
Thanks,
Jassim
Technology News @ www.JassimRahma.com
|
|
|
|
|
First of all, I do not like your programming style. Next is in your second code you named your select object without third bracket []. That is why php is rulling out your first post input. You should know which data is missing. Its the first input data.
I do not fear of failure. I fear of giving up out of frustration.
|
|
|
|
|
Thanks I will check the bracket, meantime.. I appreciate if you tell me what do you mean by (programming style) so that I can have it done in a better way.
Thanks
Technology News @ www.JassimRahma.com
|
|
|
|
|
Thank you Chris.
My problems is solved after adding the brackets.
Thank you once again..
Technology News @ www.JassimRahma.com
|
|
|
|
|
who is crish?
I do not fear of failure. I fear of giving up out of frustration.
|
|
|
|
|
i want script that manage my time work assign tasks etc....
|
|
|
|
|
What do you mean by 'script' in this context? There are plenty of products around for time and calendar management, that Google will find for you.
Veni, vidi, abiit domum
|
|
|
|
|
|
TheSniper105 wrote: script == web app While a web app may well contain some script (Javascript, PHP), there is more to it than that. And asking what is the best, is the same as asking what is the best anything. It depends on what you are looking for, what your experience is, etc.
Veni, vidi, abiit domum
|
|
|
|
|
I am New in PHP, and getting following error message in my app, please help me to solve this.
fatal error call to undefined function mysql_connect()
|
|
|
|
|
You have to define athe function called mysql_connect before you can use it. Either add the code yourself, or find a library that already includes it.
Veni, vidi, abiit domum
|
|
|
|
|
Hi,
I have the following code:
$mysql_query = $mysql_connection->prepare("CALL sp_get_company_details(:param_company_guid)");
$mysql_query->bindParam(':param_company_guid', $_GET["id"], PDO::PARAM_STR);
$mysql_query->execute();
$mysql_row_count = $mysql_query->rowCount();
if ($mysql_row_count <= 0) { exit(header("Location: " . $_SESSION["domain_name"] . "home")); }
while ($mysql_row = $mysql_query->fetch())
{
$company_guid = $mysql_row["company_guid"];
$company_name = $mysql_row["company_name"];
$company_industry = $mysql_row["industry_name"];
$company_country = $mysql_row["country_name"];
$company_telephone = $mysql_row["company_telephone"];
$company_fax = $mysql_row["company_fax"];
$company_website = $mysql_row["company_website"];
$company_email = $mysql_row["company_email"];
$about_company = $mysql_row["about_company"];
$hide_email = $mysql_row["hide_email"];
}
$mysql_query->closeCursor();
if (isset($_SESSION["member_guid"]))
{
$mysql_query = $mysql_connection->prepare("CALL sp_check_if_company_admin(:param_company_guid, :param_member_guid)");
$mysql_query->bindParam(':param_company_guid', $company_guid, PDO::PARAM_STR);
$mysql_query->bindParam(':param_member_guid', $_SESSION["mmeber_guid"], PDO::PARAM_STR);
$mysql_query->execute();
while ($mysql_row = $mysql_query->fetch())
{
$is_company_admin = $mysql_row["company_admin_id"];
}
}
var_dump($company_guid);
var_dump($_SESSION["member_guid"]);
var_dump($is_company_admin);
the result for the three var_dump is:
string(36) "30383394-53bf-11e3-aef0-74de2b9a31a4" string(36) "22e52867-495d-11e3-95af-74de2b9a31a4" NULL
my question, why I am getting NULL? when I run the sp_check_if_company_admin on the database server using the same param's value I get a single record with company_admin_id = 13 so it's not NULL.!
Please Help...
Technology News @ www.JassimRahma.com
|
|
|
|
|
There's a typo in the last bind:
$mysql_query->bindParam(':param_member_guid', $_SESSION["mmeber_guid"], PDO::PARAM_STR);
"mmeber_guid" should be "member_guid"
|
|
|
|
|
oh my god! I spent whole night trying to find out where is the issue!
Thank you so mucn
Technology News @ www.JassimRahma.com
|
|
|
|
|
|
Hi friends i hope all is well
i need some help from all of you
i have an project sale managment system in php that works with wamp server 2.0 and run on local computer
security is that it just works on single pc when ever i try to run it on any other pc
when i login on other pc with same user name and password
it open a fake page instead of original Main manu page which contains all manues and header footers
i just want to run it on all computers but it work with single pc
index page raffer to D:\soft2\www\admin\config\connection.php
which have these codes
<?php
eval(base64_decode(
?>
please please reply me
|
|
|
|
|
This code block decodes to:
$codelock_code = "JGNvbm4gPSBteXNxbF9jb25uZWN0KCJsb2NhbGhvc3QiLCAicm9vdCIsICJ0YWhpcmEiKTsNCm15c3FsX3NlbGVjdF9kYigiamFsY!kZXIiLCRjb25uKTsNCg==";
$codelock_code = str_replace("@","CAg", $codelock_code);
$codelock_code = str_replace("!", "W5", $codelock_code);
$codelock_code = str_replace("*", "CAgI", $codelock_code);
$codelock_code = base64_decode($codelock_code);
eval($codelock_code);
This second block decodes to:
$conn = mysql_connect("localhost", "root", "tahira");
mysql_select_db("jalander", $conn);
So it looks like the other PC you're trying to run it on either doesn't have a local MySQL instance, has a different root password, or doesn't have a database called "jalander".
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|