Friday, May 21, 2010

How to echo text to a pop-up window using PHP - HELP!?

Hi, I'm trying to echo a message to a pop-up window to tell a user that they are already logged in, using PHP. I've tried a few methods, but I can't get anything to work, so hopefully you people out there are a lot more creative than I am! Thanks in advance!

How to echo text to a pop-up window using PHP - HELP!?
Just echo a javascript to open the window if the user is logged in:





%26lt;?php


if(user_logged_in)


{


echo "%26lt;script language="javascript"%26gt;";


echo "new = open('','','widht=300,height=80');


echo "new.document.write(' You are logged in');


echo "%26lt;/script%26gt;";


}


?%26gt;

birthday cards

What php framework would you recommend to a seasoned developer?

Hello everyone! I'm using php for over 2 years and I am thinking about improving my efficiency. I saw that there are lots of frameworks that promise they will help you with that(cake php, zope etc). What php framework do you use/used and really helped you in getting the things done faster and better? (please note that I would like something that can scale to big projects)

What php framework would you recommend to a seasoned developer?
I've played with a bunch of PHP frameworks including cake and blue shoes. The only one that I've been happy with is Zend framework. It's made by the PHP people, it's all OO and it's done really really well. We use it at our company and it does some nifty things like handling SOAP and REST calls. It's lightweight and fast.





The downside is that it's in the early stages of development so you'll need to be flexible enough to upgrade frequently as new feature become available. I'm normally very anti-framework when it comes to big projects, and in PHP land, there's a lot of crap frameworks. But Zend FW cuts down development time, scales nicely and is easy to work with.
Reply:If you need to scale, forget frameworks. The amount of unnecessary baggage you carry within a framework can be staggering; using frameworks speeds up development, but the resulting code is almost always memory-hungry and often contains poorly written machine-generated SQL. The end result is bloated codebase and suboptimal database usage...





Alternatively, you can build project-specific frameworks. This way, you ensure that any assumptions that you make when developing a framework are valid for your project and domain.





And, by the way, Zope is a Python, not a PHP, framework...


Can someone tell me what php is exactly and link me to a simple guide for quick and easy use?

Well I want to start doing php pages on my domain and etc. but I'm not sure what it is and I want a quick start guide to php. I don't want some step by step with all this crazy stuff, I'm not too bright : (, anyhow just a quick start guide lol. Thanks in advance!

Can someone tell me what php is exactly and link me to a simple guide for quick and easy use?
http://en.wikipedia.org/wiki/PHP





here is a good start for you... hope it helps...
Reply:PHP is a server-side web programming language, similar to Perl.





For a basic introduction I'd try http://www.w3schools.com/php/default.asp . I've learned the most, however, with a book called "PHP 5 In Easy Steps" published by Barnes %26amp; Noble.
Reply:its a programming language thats suposedly real good for web programming, how quick are u thinking??
Reply:PHP is another scripting language... like ASP, Javascript... Basically, it allows you to mess around with variables, uses booleans, run loops, and connect with databases. Most people will use mysql databases with PHP because it is very easy to incorporate into any script.





If you want a good guide on PHP, I recommend http://www.tizag.com/phpT/ guide to help you. It really explains everything from a to z in php. I also recommend http://search.barnesandnoble.com/booksea... book. I consider it one of the best books for learning PHP. The author does a great job teaching, and giving examples.





Something to note about php... ever wonder what "?id=blah%26amp;test=hello" is at the end of urls? Well, those are variables being passed to a page that uses them! In that statement... the variable "id" equals "blah" and the variable "test" equals "hello".. just some food for thought.





Something else you will need to know.. is every php page has to have a .php extension... php won't run in .html, .htm.... When you want to use php in a .php file... you must surround the php code with %26lt;? and ?%26gt; to close. Otherwise, your code will just displayed on the page.





I hope this helped you a little bit!


How do I add a photo to my php code?

I have some simple php code that outputs a quiz and I would like to add photos to go along with each question. How do I do that?

How do I add a photo to my php code?
You could do:





echo "%26lt;img src='SRC_HERE'%26gt;";
Reply:Just as you would add a photo to ordinary HTML or XHTML. Use the %26lt;img%26gt; tag.
Reply:Please post the code and the file locations of the images you want to include. It is really just knowing the html. standard image insertion is:


%26lt;img src="images/myimage.jpg" /%26gt;





so if you are getting the image filename from a database, it should look something like:





%26lt;img src="images/%26lt;?php echo $yourquery['yourfilenamefield']; ?%26gt;" /%26gt;





Any questions, you can email or IM... email will always get a response, IM only if I am at the computer at the time..


How can i find a source code of PHP Mysql of newbienude.com?

I am planing to build a website similar to that please let me know your ideas where I can get the source code of that site. In PHP and Mysql because it is created in ASP. Thank you so much, you help is well appreciated, Thank you!

How can i find a source code of PHP Mysql of newbienude.com?
we can get all source in php to use the site is www.w3schools.com

sepal

Any pages I include with php lose there style formatting in Internet Explorer. Can I fix this?

After designing my website and checking it with firefox (I know this isn't the brightest idea) I opened it in internet explorer 7 and the styles for bits of the page that where included had apparently been lost. Is this what happens with all dynamically created bits of a website? Is it all of the style that is "lost" or just certain parts that Internet Explorer doesn't handle well? Any fixes?





Thanks for all the help!

Any pages I include with php lose there style formatting in Internet Explorer. Can I fix this?
Assuming you are calling your styles inline, make sure they are quoted properly, e.g. %26lt;p class="myclass"%26gt;. Note that "myclass" is contained in double-quotes.





Ensure you provide all CSS in %26lt;style%26gt; declarations contained in the %26lt;head%26gt; tag.





Ensure you provide CSS elements that match the W3 specification http://www.w3.org/TR/CSS21/





You can validate your CSS here: http://jigsaw.w3.org/css-validator/
Reply:IE is not very standard for formatting codes, it also is not good at interpretting badly coded pages. Check your styles against the standards for IE and others. I have seen firefox cope with a missing %26lt;/a%26gt; at the end of a link, IE turned the following eight links into one link (the first). Check your code very carefully.


Anyone know how to setup a popup chat on a website, preferably in php?

I need to be able to cause a popup chat box to appear on the user's browser window, like in a helpdesk program. (I think it was Crafty Syntax that I am referring to...)





Anyways, I need someone to assist me or direct me to assistance in setting up an interactive php chat box that can be initiated from an administrator remotely, to a customer/user. (or even an invitation to chat, but it still must be initiated by an admin)





Any help, please.

Anyone know how to setup a popup chat on a website, preferably in php?
Best place to find free scripts (PHP, CGI, Perl, ASP, ASP.NET or Ajax) are www.hotscripts.com
Reply:Since PHP only does server-side scripting, it's not going to be sufficient for a chat application. You're going to need AJAX to load live updates in a browser window without page refreshing, and the pages that your customers/users are on are going to need to use AJAX every 5 seconds or so to check for chat invitations. This is doable, but complex enough that you would want a professional to develop it for you.





There's a site I've used for free online conferencing called Gabbly.com, which creates chat windows on the fly that can be associated with any page on the internet. You can have anyone join the chat window, but you'd have to find some way to pass them the link to it first. I don't know if that fits your purposes, but you might think of a way.