 |

|
When posting your question please:- Choose the correct forum for your message. Posting a VB.NET question in the C++ forum will end in tears.
- Be specific! Don't ask "can someone send me the code to create an application that does 'X'. Pinpoint exactly what it is you need help with.
- Keep the subject line brief, but descriptive. eg "File Serialization problem"
- Keep the question as brief as possible. If you have to include code, include the smallest snippet of code you can.
- Be careful when including code that you haven't made a typo. Typing mistakes can become the focal point instead of the actual question you asked.
- Do not remove or empty a message if others have replied. Keep the thread intact and available for others to search and read. If your problem was answered then edit your message and add "[Solved]" to the subject line of the original post, and cast an approval vote to the one or several answers that really helped you.
- If you are posting source code with your question, place it inside <pre></pre> tags. We advise you also check the "Encode HTML tags when pasting" checkbox before pasting anything inside the PRE block, and make sure "Ignore HTML tags in this message" check box is unchecked.
- Be courteous and DON'T SHOUT. Everyone here helps because they enjoy helping others, not because it's their job.
- Please do not post links to your question in one forum from another, unrelated forum (such as the lounge). It will be deleted.
- Do not be abusive, offensive, inappropriate or harass anyone on the boards. Doing so will get you kicked off and banned. Play nice.
- If you have a school or university assignment, assume that your teacher or lecturer is also reading these forums.
- No advertising or soliciting.
- We reserve the right to move your posts to a more appropriate forum or to delete anything deemed inappropriate or illegal.
When answering a question please:
- Read the question carefully
- Understand that English isn't everyone's first language so be lenient of bad spelling and grammar
- If a question is poorly phrased then either ask for clarification, ignore it, or mark it down. Insults are not welcome
- If the question is inappropriate then click the 'vote to remove message' button
Insults, slap-downs and sarcasm aren't welcome. Let's work to help developers, not make them feel stupid.
cheers,
Chris Maunder
The Code Project Co-fou
|
|
|
|

|
Hi,
I am using arabic web font and it's working perfect on Chrome and Safari but not in IE?
@font-face {font-family: "Kufi"; src: url('font/DroidKufi-Regular.ttf') ;}
How can I fix it please?
Thanks
Technology News @ www.JassimRahma.com
|
|
|
|
|

|
Hi,
I have a PHP page with cboindustry <select> item. I am doing the following to check if <select> has an entry then it will run the stored procedures:
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();
}
}
but I am getting the following error:
PDO Exception Caught. Error with the database:
SQL Query: Code: HY000 Error: SQLSTATE[HY000]: General error: 1366 Incorrect integer value: '' for column 'param_company_industry' at row 1SQLSTATE[HY000]: General error: 1366 Incorrect integer value: '' for column 'param_company_industry' at row 1
here is my var_dump of the cboIndustry:
array(1) { [0]=> string(0) "" }
and here is the html:
<tr>
<td valign="middle">Industry</td>
<td valign="middle">:</td>
<td valign="middle">
<div id="container">
<select id="cboIndustry" name="cboIndustry[]" style="width: 80%" <?php if (!$_GET["id"]) { ?>required<?php } ?>>
<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 echo $mysql_row['industry_name']; ?></option>
<?php } ?>
</select>
<button id="btnAddIndustry" type="button" style="width:150px">Add More</button>
</div>
</td>
</tr>
Technology News @ www.JassimRahma.com
|
|
|
|

|
According your error the problem is that $value is not numeric (empty)...
|
|
|
|

|
I am trying to add html5 video tag element in my website, video is working fine in FIREFOX , CHROME , IE11 but it is not working in safari, opera.
Code i have used is
<video loop="loop" autoplay="autoplay" preload="none">
<source src="video/video1.mp4" type="video/mp4"></source>
</video>
More over i tried with html5easy editor tool to convert to get .ogg format still i am facing the same problem.
Thanks
modified 10-Jan-14 1:58am.
|
|
|
|
|

|
Hi,
I changed my wodrpress URL manually and after then i saved and loged out from admin panel . now i can't login to my wordpress Admin page after changing The URL 's and whenever i want to log in it redirects to other page that i changed in URL . now i can't login to Admin page to correct URL's . what should i do to solve this problem .
Thanks so much ,
D.riazi
|
|
|
|

|
Contact Wordpress and ask for help.
Veni, vidi, abiit domum
|
|
|
|

|
I don't have any access to server and database .
Is there any other solution for solving this issue ?
D.riazi
|
|
|
|

|
please help me to solve this problem .
It's very important for me as soon as possible to find a better solution to solve this issue .I must log in admin panel to improve my site .
D.riazi
|
|
|
|

|
When was the last time you managed and backed-up the WordPress MySQL database? Assuming you have a back-up (you DO have a back-up don't you?) ... Perhaps you can restore it to the last back-up state - that's the back-up prior to you changes you (incorrectly?) made, AFTER backing-up the presently existing database. The description of the database is ... http://codex.wordpress.org/Database_Description[^] and ... https://wpbits.wordpress.com/2007/08/08/a-look-inside-the-wordpress-database/[^]
You say you don't have access to the server and database ... WELL go and ask the creator of that solution for access details and any DB back-ups.
Your web host logon would not have changed. So access and manage that database via that web host logon.
|
|
|
|

|
Hi ,
Unfortunately , i do not have any access to server and my database .
Is there any other solution for solving this issue ?
Thanks ,
D.riazi
|
|
|
|

|
So you want us to help you hack into a WordPress site that you don't have access to?
Yeah, that's not going to happen.
If you own the site, contact WordPress. If you don't own the site, then you can't access it.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|

|
You could try and grovel to the web hosting organization, but I seriously doubt any success (you know ... Security and authenticity etc). Alternately, thump (metaphorically speaking) the owner of that website until he/she/they give you access details to the web hosting organization and hopefully a recent db back-up. AND understand the importance of backing-up a database.
Otherwise, you are up a creek without a paddle. And you can perform no work until they do supply that info!
A general word of advice, "Don't change anything unless you can undo such changes without breaking the thing!"
Sorry
modified 10-Jan-14 10:31am.
|
|
|
|

|
Thanks for your advice ,
D.riazi
|
|
|
|

|
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)) { ?>
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('JGNvZGVsb2NrX2NvZGU9IkpHTnZibTRnUFNCdGVYTnhiRjlqYjI1dVpXTjBLQ0pzYjJOaGJHaHZjM1FpTENBaWNtOXZkQ0lzSUNKMFlXaHBjbUVpS1RzTkNtMTVjM0ZzWDNObGJHVmpkRjlrWWlnaWFtRnNZIWtaWElpTENSamIyNXVLVHNOQ2c9PSI7ICRjb2RlbG9ja19jb2RlPXN0cl9yZXBsYWNlKCJAIiwiQ0FnIiwgJGNvZGVsb2NrX2NvZGUpOyAkY29kZWxvY2tfY29kZT1zdHJfcmVwbGFjZSgiISIsICJXNSIsICRjb2RlbG9ja19jb2RlKTsgJGNvZGVsb2NrX2NvZGU9c3RyX3JlcGxhY2UoIioiLCAiQ0FnSSIsICRjb2RlbG9ja19jb2RlKTsgJGNvZGVsb2NrX2NvZGU9YmFzZTY0X2RlY29kZSgkY29kZWxvY2tfY29kZSk7IGV2YWwoJGNvZGVsb2NrX2NvZGUpOyAK'));
?>
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
|
|
|
|

|
I am trying to update the PHP on my web server. On my backup server I updated from 5.2 to 5.4 and the result is kind of bizarre.
<!-- Include command uses command "virtual" to specify file relatively. Do not use "file" command -->
<!--#include virtual="_assets/header.shtml" -->
<!-- Include command uses command "virtual" to specify file relatively. Do not use "file" command -->
<!--#include virtual="_assets/marquis.shtml" -->
The includes above worked correctly prior to the update. This is what I see when viewing the page source in my browser:
<!-- Include command uses command "virtual" to specify file relatively. Do not use "file" command -->
<div class="header">
<!-- More HTML code -->
</div><!-- end .header -->
<!-- Include command uses command "virtual" to specify file relatively. Do not use "file" command -->
<div id="marquis">
<!-- coming soon -->
</div>
After the update I see this:
<!-- Include command uses command "virtual" to specify file relatively. Do not use "file" command -->
<!-- Include command uses command "virtual" to specify file relatively. Do not use "file" command -->
The bizarre part is that the includes get injected seemingly at random further down the page and in the middle of source that is generated by PHP code. Is there a DOCTYPE or PHP configuration setting that needs to be changed?
Thanx,
>>>-----> Mike
|
|
|
|

|
I had not really given much thought to the server-side includes. They have always worked.
I did some research though and found that SSI is essentially a separate interpreter. The order of whether SSI is included inside PHP or vise-versa matters (apparently depending on your version of PHP).
I also found that comment begin and end tags are more strict after I made my updates.
<!--div>
some stuff
</div><!--end div-->
While I know it is bad form, commenting out a "div" as shown above worked prior to the PHP update. After the update, the text "<!-- div>" and "some stuff" appears in the output.
I have found how to fix the problems I experienced as a result of the PHP update, but as far as I can tell Apache was not updated. So, I am still wondering why updating PHP causes non-PHP elements to break?
Thanx,
>>>-----> Mike
|
|
|
|

|
I have a class like this :
class Packet {
private $headerSize;
private $signature;
private $version;
private $highSessionID;
private $lowSessionID;
private $commandID;
private $dataSize;
}
i want to write reliable udp protocol ,
i want to know how can i split an instance of my packet class into chunks and send them with socket_sendto function
|
|
|
|

|
kleymanx90 wrote: i want to write reliable udp protocol , Then you will need to include a lot of error checking. Why not use TCP which is reliable? When sending the data, you can send it in one chunk with field separators between each section, or as individual chunks. In either case you should add a header which identifies the field type and gives its length, and possibly a trailer containing a CRC check digit. In that way the receiving code should be able to unpack it correctly.
Veni, vidi, abiit domum
|
|
|
|

|
Because UDP is faster than TCP . I have an UDPPacket class too.My UDPPacket includes my packet class and UDP header .
I want to send chunks of video for streaming and maybe some XML files .
I found pack function and I packed all fields but I want to know is there anyway to pack an object and then split into chunks ?
|
|
|
|

|
Packing and splitting is exactly the same whatever the data, you just need some metadata with each chunk so the receiver can recreate the original object. I take it you also understand that UDP does not guarantee delivery of any message, nor does it guarantee the order in which messages may be transferred.
Veni, vidi, abiit domum
|
|
|
|

|
kleymanx90 wrote: Because UDP is faster than TCP
It's faster because it doesn't include the overhead of making sure transfers get to where they're going. If you try to make UDP reliable, you're trying to make UDP act like TCP, which will inevitably make it slower.
|
|
|
|

|
kleymanx90 wrote: reliable udp protocol ,
Those two don't go hand in hand. UDP was designed to be fast, not reliable. Reliability requires error checking and handling, in another words, you'll end up making UDP something it's not. If you need reliability, use TCP, that already has all of the error checking and re-transmissions built into the protocol.
|
|
|
|

|
Hello!
I am developping a website.i want to display images that are sliding unfortunately i failed to achieve that.
need a your help so that i can get php codes to display those images.
question 2: how to create admin page in MYSQL??
|
|
|
|
 |