 |
|
 |
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
|
| Sign In·View Thread·PermaLink | 5.00/5 (2 votes) |
|
|
|
 |
|
|
 |
|
 |
not sure if you mean you have a string with a number in it and need to pull just the string or if you have a number returned as a string.
but for the first you can separate the string using explode and then looping through the returned array and checking for is_numeric returning true and extracting that.
the second should be able to be used directly $a = '1'; $echo 1 + $a; but if there is a issue with it, you can use an explicit cast like in C (int)$a for example.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
In the PHP documentation of Strings[^] there is a little snippet just over a third of the way down called "String conversion to numbers", which may help you.
Other than that, you could always go through the string char by char
If at first you don't succeed, you're not Chuck Norris.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Scenario: a GUI allows to upload a .jpg and display on the page.
I successfully got the data of .jpg and uploaded into Oracle, the problem is the data row of this .jpg has length=0 and couldn't display the picture.
How can I check to see if the query(use to insert into database) bears the correct value before inserting? if yes, what might be the problem that oracle database doesn't have correct value?
Have spent a long time but couldn't figure out the issue, please give advice..thanks..
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
 |
I am trying to install LAMP in ubuntu For that I completed the following steps successfully in the order shown below
1. sudo apt-get install apache2 2. sudo /etc/init.d/apache2 start 3. sudo apt-get install php5 libapache2-mod-php5 4. sudo /etc/init.d/apache2 restart
After the above steps I created a PHP page named test.php in /var/www The contents of test.php is
echo “Hello World”; ?>
I am 100% sure that there is no syntactical errors in the php code. But when I access the page using “http://localhost/test.php”, the following error showed
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /var/www/test.php on line 2
I don't know what to do at this situation. Please suggest me a solution.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Gjm wrote: I am 100% sure that there is no syntactical errors in the php code. But when I access the page using “http://localhost/test.php”, the following error showed
Okay, then the code you're using is different from the code you've posted. Try the following:
<?php echo "Hello, World!"; ?>
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Gjm wrote: I am 100% sure that there is no syntactical errors in the php code. But when I access the page using “http://localhost/test.php”, the following error showed
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /var/www/test.php on line 2
One of these statements must be false, I suspect it is the first one. The double quote characters around your string do not look correct, you should probably replace them with proper " characters.
|
| Sign In·View Thread·PermaLink | 5.00/5 (1 vote) |
|
|
|
 |
|
 |
I know the first reaction is no, but I was musing over this and wanted to bounce the idea off of you good people.
First, why would anyone do this?
Well from my work environment, I work for a business that has multiple websites under different domains. For example I will use www.site1.com and www.site2.com. The sites are hosted on seperate servers. Both of these sites have their own product lines that they sell and a third party is hired to do data entry into both sites. All back-office web apps are designed in-house and the third party company can log into each sites product entry page to enter new items and update prices. But doing so requires a seperate login at each site.
Now reading up on moving php session data into a mysql database got me thinking a little additional work may permit multi-site logins. As I understand it a session is tied to a domain, which must be sent in each request for a given browser. In the datbase-based session storage this is stored, along with some other data. If a custom write and read is designed, one could also create a record for each additional domain that would want to share a login using the same session info with the domain info changed for each site.
Doing this of course means the various sites would need access to the same database, but it sounds like it would work to me. I am posting this so maybe those of you that have more experience with custom session solutions in PHP can poke holes in this idea before I start to work on it.
Chris J.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Hi... I am building a website with php platform, suppose name is MyPhp. We have another website which is developed with joomla. Now I want to use a plugin which is developed in joomla in MyPhp website for search data from joomla database.
Thanks.
PUJA FALDU
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
|
 |
|
 |
Hi,I am new in PHP.I have installed PHP5.3.0 under IIS 5 and Windows XP.It runs properly.
But whenever I tried to install PHP 5.3.0 under IIS6 and Windows Server 2003,it always throws an error which says "<b>CGI Error:The specified CGI application misbehaved by not returning a complete set of HTTP headers</b>".I have followd the same steps which i did while installing PHP 5.3.0 under IIS 5 and Windows XP.
I searched the web.....did everything they said....but invain.
Can anyone help me?
CC26
|
| Sign In·View Thread·PermaLink | 5.00/5 (1 vote) |
|
|
|
 |
|
|
 |
|
|
 |
|
 |
Hi
Am new in PHP our teacher asked us to write a simple page that has items to sell for example i have a shirt , i have to enter how many i want (let us say i wrote 3), and i choose 4 Jackets, then when i hit the submit button, it show me a simple invoice saying: item name : item quantity : items price and at the end the total payment
I think it is something like shopping cart but a simpleone, i want to be stored in Database
Can u help me
|
| Sign In·View Thread·PermaLink | 1.00/5 (1 vote) |
|
|
|
 |
|
 |
Good PHP starter tutorials: http://www.tizag.com/phpT/[^]
The PHP manual (your top resource): http://php.net/manual/en/index.php[^]
PHP and MySQL tutorial: http://www.w3schools.com/PHP/php_mysql_intro.asp[^]
Keep it simple (don't waste time making it look nice if you aren't getting graded on it).
As for the actual building it, your going to have to do your own research. As a general rule, the posters here will only point you in the right direction (especially true of students) and not spell the answer out for you. And I do advise trying to build your own cart rather than following a tutorial - it will give you a good mindset for php development in future.
Best of luck
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
thanx mark for the websites
I searched them before, but i have a problem i don't know how to store the option in the select menu , and how to retrieve them from the database
:S :S 
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
As wampserver2 comes with php 5.3.0 but it is not compatible with Joomla 1.5, so, I need to install php 5.2.9 on wamp server2 and delete php 5.3.0 Plz help
|
| Sign In·View Thread·PermaLink | 5.00/5 (1 vote) |
|
|
|
 |
|
 |
I too used wampserver2 sometimes. I'm curious why you want to delete the latest version? I have no problems with it.
Sir.Dre
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
FWIW: I'm running XAMPP 1.6.6 which has PHP 5.2.5, which I downloaded and installed 17 months ago. (I had WAMP before that).
Not sure which PHP currently is part of XAMPP, you should be able to find out here[^], and maybe older versions are still available.
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
 |
Hi...
I have create or install zoomla successfully. But now i can't understand,from where i have to start. How can i integrate my php project to zoomla? suppose if i want to add my gridview page of my site in zoomla what i have to do? what about spider and zoomla integration?
Kindly help to solve this issue. Thanks.
PUJA FALDU
|
| Sign In·View Thread·PermaLink | 1.00/5 (1 vote) |
|
|
|
 |
|
 |
In Windows hosting $ud=fopen("..\html/vol.html","w"); it is working but not working in Linux hosting what i need to change ?
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |