 |
 |
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
|
|
|
|
 |
what,s the new app today that demanded using php....????
|
|
|
|
|
 |
how to work on chat app by using php........plz tell the coding
|
|
|
|
 |
Please do your own research, Google will find you many samples.
|
|
|
|
 |
Message Automatically Removed
|
|
|
|
 |
Dear All, I have already json file that have data EmpCode and EmpName. But how can I show the data in text box on my web page.Please help me.Here are my code. <pre lang="text"> <html> <head> <title>Employee</title> <?php function getemployee() { $url = "http://localhost/1004.json"; $json = file_get_contents($url); $data=json_decode($json, TRUE); return $data; } ?> </head> <body> <form method="post"> Emp Code:<input type=text name="text1" /> <br> Emp Name:<input type=text name="text2" /> <br> <input type="submit" onclick="'<?php' getemployee(); '?>'" value="Get"/> </form> </body> </html> </pre>
|
|
|
|
 |
<input type="text" name="text2" value="<?
echo $json = getemployee();
$json->var
?>"/>
obj is your Variable name
use print_r(getemployee()) view json Structure;
|
|
|
|
 |
Dear All,
I'm a win app programmer but a very fresher in web. Now I have to do with web, so I am studying in web with PHP. I have to figure out the problem that I want to show data from Sql Database on PHP web page via web service by generating JSON file. I don't use the internet. All are in local only. I create web page two text box and one button. I type 01 employee code in textbox1 and click the button to get employee name from sql db. There are function in web services. When the button click, PHP page will send 01 to web service and then the function in web service will get the emp name from sql db and returns json file and finally PHP page will be read json file and show emp name in textbox2. So I can't control one round procedure PHP, Web Service, JSON and Sql db. Please help me. Very thanks everyone. I hope with great wish for that. Please.
Thanks you all
|
|
|
|
 |
use function to send response to browser in json format or just echo response array in json public function send_response($response_data){ //$resonse_date is of array type echo json_encode($response_data); } catch json response in ajax callback for success . $.ajax({ url: 'php service call' , type : 'POST',// type of call GET ,POST data : JSON.stringify(params),//pramas array success :function(data) {//call back functin //reponse data in json format //put here your logic }, error : function(data){alert('if any error');} });
|
|
|
|
 |
I m installed sqlserver for my final project... i wanot installed properly.. i uninstalled it.. no i m installng it again but getting the following error when i click on the icon of "SQL Server Management Studio Express".. plz help me.. i would be very thnkful to you.
"The automatically saved settings file ' C:\Users\Bilal\Documents\ SQL Server
Management Studio Expres\Settings\CurrentSettings-2014-06-18.vssettings' cannot be found.You can change this file on the 'Import and Export Settings' Tools Options Page. the IDE will use the most recent settings for this session."
|
|
|
|
 |
Hi,
f anyone tried a PHP framework, which you'll recommend please?
Thanks,
Jassim
Technology News @ www.JassimRahma.com
|
|
|
|
|
 |
None!
Frameworks are good, if you get in the area of content management, otherwise they are just a waste of time.
|
|
|
|
 |
Hi guys! I need your help !
I'm doing a form in PHP and a want to display in my dropdownlist name column from my DB and save the name_id of that name selected from dropdownlist in DB.
Here is my code
if(isset($_POST["submit"]))
{
$bookshop_id = mysql_real_escape_string($_POST["bookshop_id"]);
$book_id = mysql_real_escape_string($_POST["book_id"]);
$quantity = mysql_real_escape_string($_POST["quantity"]);
mysql_query("INSERT INTO `books_bookshop`(`bookshop_id`,`book_id`,`quantity`)
VALUES ('" . $bookshop_id . "','" . $book_id . "','" . $quantity . "')")
or die ("Book could not be registered.");
}
?>
|
|
|
|
 |
<form method="post" action="#">
<label for="bookshop_id">Bookshop Name</label>
<select style="width:148px;" id="bookshop_id" name="bookshop_id" value="bookshop_id" >
<?php
$query = mysql_query("SELECT `name`,`bookshop_id` FROM `bookshop`");
while ($row = mysql_fetch_array($query))
{
?>
|
|
|
|
 |
<option>
<?php echo $row["name"]; ?>
</option>
<?php } ?>
</select>
</td>
</tr>
<tr><td><select name="book" id="book" value="book">
<?php $query = mysql_query("SELECT `name` FROM `books`");
while ($row = mysql_fetch_array($query)){?>
<option><?php echo $row["name"]; ?></option>
<?php } ?>
</select>
<tr>
<td><input type"submit" name="submit" value="Register book"></td>
</tr>
</table>
</form>
|
|
|
|
 |
Why have you posted three messages? It looks like you have answered your own question.
Use the Edit link at the bottom of your original, add the extra code and description, and delete the other two messages.
|
|
|
|
 |
have a tree menu(category,subcategory,sub-subcategory...) its all in a single table and uses parentID to determine layout of the menu. would like to now be able to update the menu by adding new menus(not on the server side). have a dropdown list of the menus where you select the parent from existing menus from the table(if you select none,then creates a new category in the table else inserts under matching parent based on parentID).need help parsing the selection from drop down menu to the parentID column in the table. am new at this so hope my question makes sense. Reggie
|
|
|
|
|
 |
Why post it here again! It's not accepted to cross-post, specially when you already got some answers in Q&A;!!!
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
 |
Hi
I didn't get any answers since. I thought I had posted it in the wrong session; This is why I reposted it here. Sorry;
Any idea to my problem;
|
|
|
|
 |
You got some! answer. If this isn't good enough than comment there!
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
 |
The Joomla docs are very basic, so I'm asking for directions to other resources on what is involved and what I must do to create a Joomla module. The module must manage merchants and vouchers, two custom content types I presume, and members, built in I presume. I need to create/manage these, and create capture and maintenance screens for vouchers and merchants. What are the high level tasks required to do this? The coding and creation of the basic module package I can manage, but how does it all fit together etc? I'm .NET, and have only done WordPress plugins on the LAMP side.
|
|
|
|
 |
Hi... I am using input box to user enter date which is the my db table. When user input date and click submit button it shows report,up to this works fine. From here I want to show 10 items per page with previous next button. How do I do?
|
|
|
|
 |
Report? using which tool? Always include those details in your question.
Basically you could achieve that using options like formula. Do Google search using "Your reporting tool + paging", you'll get tons of results.
Or if you're using any direct output by HTML, use filter(s). Check these articles(not related to php)
Efficient paging using SQL script[^]
Paging GridView with ROW_NUMBER()[^]
|
|
|
|
 |
Hi,
I would like to ask if anyone tried upload a photo using PHP and HTML.
I don't want to use Browse and Upload buttons. I just want the user to click on Upload which will browse then upload immediately to a dynamic folder.
are there any good free plugins available? or your recommend to code it?
Thanks,
Technology News @ www.JassimRahma.com
|
|
|
|
 |
use ftp right?write(program) a can upload's website,right?use the html 5 and javascript code,right?,im a beginner and im a chinese.i have alway practise my english
|
|
|
|
 |
Hi,
I have a two mirror sites,
http:I am trying to use the SOAP V2 in both the sites. Its working fine in ‘http:But in ‘http:When I open the SOAP URL ‘http:Not able to get what the exact error is. Pls help if possible.
|
|
|
|
 |
I just had these error a few days before. The problem was with the hosts file of the server. The domain name (in your case domain) wasn't in the hosts file so it PHP wasn't able to resolve it...
You can do one these things to fix it:
1. Add new entry to hosts file
2. change url to localhost or ip
3. change url to relative
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
 |
Where do i look for the host file to make an entry into the file? I access the site folder from Plesk control panel.
|
|
|
|
 |
Hi all,
I am new to magento, and know very little about the coding style. I searched a lot of forum but was unable to get a proper answer to my doubt. I have added a custom column in ‘sales_flat_order_item’ table. In cart, when a item is added, a special price is calculated for each item in the cart. I need to save this calculated price in ‘sales_flat_order_item’ table when checkout. Please check the attached image. Can anyone help me as to how can I do this?
|
|
|
|
 |
Hi,
I am using this code to destroy the session after sometime but it's not working! it's always redirecting to out file? why is that?
$inactive = 100;
$session_life = time() - $_SESSION['timeout'];
if ($session_life > $inactive)
{ exit(header("Location: out")); }
$_SESSION['timeout'] = time();
Technology News @ www.JassimRahma.com
|
|
|
|
 |
In your case 100 is 100 seconds (you use time() that returns the time in seconds), that is not much time and that may be the reason of frequent timeout!
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
 |
I changed it to 10000 but still having the same problem.
Technology News @ www.JassimRahma.com
|
|
|
|
 |
The reason maybe that $_SESSION['timeout'] is null at the first tie you do time() - $_SESSION['timeout']. That can lead to an unpredictable large number...You have to find a way to initialize it or ask about it before use...
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
 |
what should be the value of it?
Technology News @ www.JassimRahma.com
|
|
|
|
 |
time()...But it's should be a one-time initialization...
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
 |
Problem solved.
Thanks guys
Technology News @ www.JassimRahma.com
|
|
|
|
 |
You're welcome!
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
 |
Guys
I have one more question of you don't mind...
The code I have mentioned will kill the session after specific time, let's say 10minutes regardless of what the user is doing.
Is it possible to have the same code but only when the website is idle (user had no activity on the website)?
Thanks,
Jassim
Technology News @ www.JassimRahma.com
|
|
|
|
 |
You can achieve that by updating $_SESSION["timeout"] on any incoming request...
Question: Why you don't using the session timeout feature of your web server?
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
modified 5-May-14 4:18am.
|
|
|
|
 |
You can achieve that by updating $_SESSION["timeout"] on any incoming request...
but this will not help if the user didn't post or if the user is typing an long article and still typing until 10 minutes?
Why you don't using the session timeout feature of your web server?
How please?
Technology News @ www.JassimRahma.com
|
|
|
|
 |
Jassim Rahma wrote: typing an long article That's an other story! You are talking about while user still on the client side...For that you must have some JavaScript that calls the server in certain intervals (using AJAX probably) to let server know that user still on...Google can find you a lot os samples for that...
Setting session timeout is depends on the web server you are using - see the documentation for your web server...
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
 |
Ok. I am hosting with Dreamhost.
I will check with them
Thank you so much
Technology News @ www.JassimRahma.com
|
|
|
|
 |
You're welcome!
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
 |
The exit() function stops the script, but does not destroy the Session.
If you intend to destroy the session, use session_destroy(). If you are using cookies to propagate the session, follow with setcookie() to clear the session Id from the user cookie.
Eric Crane
Non Profit Software Corporation
|
|
|
|
 |
Hi,
I have a field called created_date in MySQL with UTC_TIMESTAMP values in it
I want to know how can I display the records for that field in the local date/time of the user depends on where he?
Thanks
Jassim
Technology News @ www.JassimRahma.com
|
|
|
|
 |
Hi,
I have the following code to check if the user is_administrator then show the two menu items, otherwise of course it won't show... kindly simple! but the problem is.... when I uploaded the pages to my web host, even if the user is not administrator the menu items are shown! the value for is_administrator in MySQL is a bit = 0 but when I do a var_dump I get bool(true) although I get the correct var_dump and behavior on my local pc string(1) "0"
this is the menu items:
<?php if ((bool)$_SESSION["blended_learning_is_administrator"] = true) { ?>
<tr><td><button id="btnManageUsers" type="button" style="width: 100%;">Manage Users</button></td></tr>
<tr><td><button id="btnNewUser" type="button" style="width: 100%;">New User</button></td></tr>
<?php } ?>
and this is the is_administrator:
while ($mysql_row = $mysql_query->fetch())
{
$_SESSION["blended_learning_user_name"] = $mysql_row["user_name"];
$_SESSION["blended_learning_is_administrator"] = $mysql_row["is_administrator"];
exit(header("Location: " . $_SESSION["blended_learning_domain_name"] . "mypage"));
}
Technology News @ www.JassimRahma.com
|
|
|
|
 |
I think you need to use the '==' double equals sign to check for equality. One equals sign will assign the value to the variable.
vbmike
|
|
|
|
 |