 |
 |
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'm a total newbie to JavaScript, Ajax and PHP, so please excuse any stupid question I might ask.
So, I'd like to use a lazy loading TreeView which gets it's data from a database via PHP. I found a JavaScript control to use and an example to try out, and now I have a question.
To lazy load the data for the expanded tree node I need to fire an Ajax request to a PHP file which gives me the answer as a JSON stream. In the example I'm trying out this PHP file only delivers one string (with 'echo'), but what do I have to do if I need to loop through a database recordset. Can I 'echo' every partial answer to my lazy loading treeview as I get it from the database or do I need to collect the complete answer inside the PHP file in a string variable and send it only when it's complete?
I hope you understand my question.
Thanks for any answer or advice in advance.
|
|
|
|
 |
No there is no real difference between lots of little echo es and one big one with the same content. Depending on your server and its buffering policy, you might find little ones a bit faster.
Cheers,
Peter
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
|
|
|
|
|
|
 |
Hello,
I am a beginner in php and I'd see a picture on the same page by validating certain criteria by pressing a button.
Here the form that I created and I would like the table appears below when I click on the button displaying statistics .
|
|
|
|
 |
hint:
1.load the statistics and use css set display:none;button on click,
(jquery) $("id of the table").show something like that
-or-
(javascript) document.GetElementById('id').style.display = block;
2.use javascript / jquery as above, and google for ajax
|
|
|
|
 |
Message Automatically Removed
|
|
|
|
 |
Hi,
I am getting the following error in my index.php:
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/meskholdings/meskholdings.com/jobs/index.php:1) in /home/meskholdings/meskholdings.com/jobs/index.php on line 3
I checked my code and my session_start() is the first line. cany anyone help please...
this is my index.php:
<?php
include("php_header.php");
include("connect2db.php");
?>
<!DOCTYPE html>
<html lang="en">
<head>
and this is my php_header.php:
<?php
ob_start();
if(!isset($_SESSION)) { session_start(); }
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL & ~E_NOTICE);
?>
Technology News @ www.JassimRahma.com
|
|
|
|
 |
Hello
I need a simple code that I can give a URL of image to this code and this code save the image in host.
Regards
|
|
|
|
 |
Please don't post the same question in multiple places.
Also posted in QA: How can Save Image with PHP?[^]
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson
|
|
|
|
 |
copy_player_image($url,$destinationurl);
copy_player_image($imgurl,$destinationurl){
$image = file_get_contents($imgurl);
$imgpath = 'images/xyz.jpg";
$fullpath = $_SERVER['DOCUMENT_ROOT'].$destinationurl;
if(!file_exists($fullpath)){
unlink($fullpath);
file_put_contents($fullpath, $imageurl);
}
return $imgpath;
}
|
|
|
|
 |
I'm stuck with this problem, any help will be appreciated.
I have a web service, it requires authentication to call functions but I couldn't authenticate.
The function XML is like this:
<s11:Envelope xmlns:s11='http://schemas.xmlsoap.org/soap/envelope/'>
<s11:Header>
<ns1:AuthHeader xmlns:ns1='MOD'>
-->
<ns1:Channel>?XXX?</ns1:Channel>
-->
<ns1:Username>?XXX?</ns1:Username>
-->
<ns1:Password>?XXX?</ns1:Password>-->
</ns1:AuthHeader>
</s11:Header>
<s11:Body>
<ns1:GetBankList xmlns:ns1='MOD' />
</s11:Body>
</s11:Envelope>
my connection codes are:
$baglanti = new :confused:SoapClient("https://galaksi.turknippon.com/appservice/mod.asmx?wsdl");
$parm = array();
$parm[] = new SoapVar('channelcode', XSD_STRING, null, null, 'Channel' );
$parm[] = new SoapVar('myusername', XSD_STRING, null, null, 'Username' );
$parm[] = new SoapVar('mypassword', XSD_STRING, null, null, 'Password' );
$Adres = "https://galaksi.turknippon.com/appservice/";
$Baslik = new SoapHeader($Adres, "AuthHeader",new SoapVar($parm, SOAP_ENC_OBJECT));
$baglanti->
|
|
|
|
 |
Please do not post the same question in multiple forums.
|
|
|
|
 |
Hello
I write a Statistics and I have a problem. I attached the files.
the zip file included 4 file.
1. t.php: included only a link
2. index.php: with scrpit refer t.php to emt.php.
3. emt.php : insert refered page in test.txt.
so when you open t.php an clink on link the t.php inserted to test.txt and have no problem.
but I want when other page link to t.php so the refer page inserted to test.txt.
you can download file from below link:
https://encodable.com/uploaddemo/files/am.zip[^]
|
|
|
|
 |
Please include your code in your question. I'm not inclined to download anything in order to answer a question and that's probably also true for anyone else here.
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson
|
|
|
|
 |
index.php:
<script language="javascript" type="text/javascript">
var test=document.referrer;
document.write("<script type='text/javascript' src='http://localhost/am/emt.php?input=" + test + "'></sc" + "ript>");
</script>
t.php:
<a href="index.php">set</a>
emt.php:
$last=$_GET['input'];
$bazdid=$last."\r\n";
$file=fopen("test.txt",a);
$rit=fwrite($file,$bazdid."\r\n");
fclose($file);
modified 30-Apr-15 18:12pm.
|
|
|
|
 |
Please verify that the code as it's shown in your previous message matches your actual code (and that it's not mangled somehow by mistake when inserting it into the message). Because the JavaScript in index.php doesn't run for me, there's a syntax error.
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson
|
|
|
|
 |
Dear Sir,
yes you are right. I correct the code. please check again.
and don't forget create a blank text file "test.txt" near to above 3 file.
this work such as database!!
|
|
|
|
 |
Hi,
I have a local network at the company and I want to have PHP applications on the server but is there any way to encrypt the files so no one will be able to read the source code even if they go physically on the server?
Thanks,
Jassim[^]
Technology News @ www.JassimRahma.com
|
|
|
|
 |
You could use Zend Guard - but it is a bit expensive if all you want to do is stop people who have access to the server poking around in the source code.
|
|
|
|
 |
If the DBA creates a new user and gives that user the RESOURCE role only, can the new user successfully connect to the database?
|
|
|
|
 |
Hi,
I have this page:
http://www.mybluefile.com/[^]
it's too slow when I sign in.. there is no problem with the line because I am able to ping with good latency as you can see in this ping result:
http://www.jassimrahma.com/temp/ping_result.png[^]
below is my stored procedure for the sign in and I have indexes applied.
where is the problem and how can investigate such case?
CREATE DEFINER=`root`@`%` PROCEDURE `sp_web_login_employee`(IN param_login_name varchar(255), IN param_login_password_salt varchar(255), IN param_login_password_hash varchar(255), IN param_ip_address varchar(255))
BEGIN
DECLARE param_employee_id INT;
DECLARE email_address VARCHAR(255);
IF EXISTS (SELECT employee_guid FROM employees WHERE login_name = param_login_name AND login_password_salt = param_login_password_salt AND login_password_hash = param_login_password_hash AND is_active = TRUE AND current_employee = TRUE) THEN
BEGIN
DECLARE param_employee_guid VARCHAR(255);
SET param_employee_id = (SELECT employee_id FROM employees WHERE login_name = param_login_name AND login_password_salt = param_login_password_salt AND login_password_hash = param_login_password_hash AND is_active = TRUE AND current_employee = TRUE);
SET param_employee_guid = (SELECT employee_guid FROM employees WHERE login_name = param_login_name AND login_password_salt = param_login_password_salt AND login_password_hash = param_login_password_hash AND is_active = TRUE AND current_employee = TRUE);
UPDATE employees SET last_login_date = UTC_TIMESTAMP(), last_login_ip = param_ip_address WHERE login_name = param_login_name AND login_password_salt = param_login_password_salt AND login_password_hash = param_login_password_hash AND is_active = TRUE AND current_employee = TRUE;
SET email_address = (SELECT contact_details FROM employee_contacts INNER JOIN contact_category ON contact_category.contact_category_id = employee_contacts.contact_category WHERE contact_category.contact_category_type = "EMAIL" AND employee_contacts.employee_id = param_employee_id AND employee_contacts.use_for_communication = TRUE);
SELECT email_address, employees_table.employee_id, employees_table.employee_number, employees_table.employee_guid, employees_table.first_name, employees_table.second_name,
employees_table.third_name, employees_table.fourth_name, employees_table.last_name, employees_table.official_name, employees_table.photo,
managers_table.employee_id AS manager_id, managers_table.official_name AS manager_name, employee_job.contract_id, employee_contracts.contract_start,
employee_contracts.contract_expiry, job_titles.job_title_name, departments.department_name, companies.company_name, locations.location_name, country.country_name
FROM employees employees_table
JOIN employee_contracts ON employees_table.employee_id = employee_contracts.employee_id
JOIN employee_job ON employees_table.employee_id = employee_job.employee_id
JOIN job_titles ON employee_job.job_title = job_titles.job_title_id
JOIN companies ON employee_job.company_id = companies.company_id
JOIN departments ON employee_job.department = departments.department_id
JOIN locations ON employee_job.company_location = locations.location_id
JOIN country ON locations.country_code = country.country_code_alpha2
LEFT JOIN employees managers_table ON employee_job.reporting_to = managers_table.employee_id
WHERE employees_table.login_name = param_login_name AND employees_table.login_password_salt = param_login_password_salt AND employees_table.login_password_hash = param_login_password_hash AND employees_table.is_active = TRUE AND employees_table.current_employee = TRUE AND employee_job.is_current = TRUE;
END;
END IF;
END
Technology News @ www.JassimRahma.com
|
|
|
|
 |
Can anyone tell me what I am doing wrong? I am getting an error message on line 9 (Locid)...
Create table Course_Section
(
Csecid NUMBER(8) CONSTRAINT PK_COURSE_SECTION PRIMARY KEY,
Cid NUMBER(6) NOT NULL CONSTRAINT FK_COURSE_SECTION REFERENCES COURSE(Cid),
Termid NUMBER(5) NOT NULL CONSTRAINT FK_COURSE_SECTION REFERENCES TERM(Termid),
Secnum NUMBER(5) NOT NULL,
Fid NUMBER(4) CONSTRAINT FK_COURSE_SECTION REFERENCES FACULTY(Fid),
Day VARCHAR(10)
Locid NUMBER(5) CONSTRAINT FK_COURSE_SECTION REFERENCES FACULTY(Locid),
Maxenrl NUMBER(4) NOT NULL,
Currenrl NUMBER(4) NOT NULL,
);
|
|
|
|
|
|