8 Replies - 9901 Views - Last Post: 08 November 2010 - 07:29 AM

#1 ItsGreg  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 11
  • Joined: 31-October 10

PHP not working on Chrome?

Posted 07 November 2010 - 09:43 PM

A while back I made an application for my client, to add text over images. You get a form, into which you write text, you select a color and position, and choose text size. The form is then submitted to another file, which reads everything, writes it onto an image, saves it and stores the link into a database. Since my main browser is Firefor I didn't bother testing it on any other browsers. But, after I was finished, my client told me that the script wasn't working. I tested it out again, and it worked on Firefox and Internet Explorer, but not on Chrome. Client said that that appication isn't urgent, but he needed it until November 10th. Now since PHP isn't dependable on the browser, I figured it had to be something to do with the form. And the form is just like any other form I've made, that works on Chrome as well. Any ideas on what could be wrong?

Is This A Good Question/Topic? 0
  • +

Replies To: PHP not working on Chrome?

#2 macosxnerd101  Icon User is online

  • Self-Trained Economist
  • member icon




Reputation: 10821
  • View blog
  • Posts: 40,346
  • Joined: 27-December 08

Re: PHP not working on Chrome?

Posted 07 November 2010 - 09:46 PM

Isn't working how? What are the specific problems or errors you are encountering? Also, can you post some code to accompany your problems or errors? :)
Was This Post Helpful? 0
  • +
  • -

#3 no2pencil  Icon User is online

  • Admiral Fancy Pants
  • member icon

Reputation: 5412
  • View blog
  • Posts: 27,427
  • Joined: 10-May 07

Re: PHP not working on Chrome?

Posted 07 November 2010 - 09:51 PM

PHP runs on the server, it prepares code to be displayed by the browser. It's most likely a Javascript issue, or something browser based.
Was This Post Helpful? 1
  • +
  • -

#4 CTphpnwb  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 3105
  • Posts: 10,903
  • Joined: 08-August 08

Re: PHP not working on Chrome?

Posted 07 November 2010 - 10:04 PM

Since php doesn't work on any browser, the issue must be related to the html, css, or javascript.
Was This Post Helpful? 0
  • +
  • -

#5 creativecoding  Icon User is offline

  • Hash != Encryption
  • member icon


Reputation: 928
  • View blog
  • Posts: 3,212
  • Joined: 19-January 10

Re: PHP not working on Chrome?

Posted 07 November 2010 - 11:14 PM

There's no way it's a PHP related problem. PHP runs on the server, not on the client.
Was This Post Helpful? 0
  • +
  • -

#6 ItsGreg  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 11
  • Joined: 31-October 10

Re: PHP not working on Chrome?

Posted 08 November 2010 - 04:07 AM

I know, that's why I don't know what the problem is. I'm not using ANY javascript, and HTML is only used for a form which is:

<form action="img.php" name="dodaj" method="POST">
                <tr>
                    <td>
                        <h3>Text:</h3>
                    </td>
                    <td>
                        <input type="text" name="besedilo" size="50">
                    </td>
                </tr>
                <tr>
                    <td><h3>Text color:</h3></td>
                    <td>
                        <select name="barva">
                            <option value="black" selected>Blask</option>
                            <option value="white">White</option>
                            <option value="red">Red</option>
                            <option value="yellow">Yellow</option>
                            <option value="green">Green</option>
                            <option value="blue">Blue</option>
                            <option value="pink">Pink</option>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td><h3>Text size:</h3></td>
                    <td>
                        <input type="text" name="pisava" value="20" maxsize="2">
                    </td>
                </tr>
                                <tr>
                    <td><h3>Text position:</h3></td>
                    <td>
                        <input type="radio" value="top-left" name="poz">
                        <input type="radio" value="top-center" name="poz">
                        <input type="radio" value="top-right" name="poz">
                        <br/>
                        <input type="radio" value="left" name="poz">
                        <input checked type="radio" value="center" name="poz">
                        <input type="radio" value="right" name="poz">
                        <br/>
                        <input type="radio" value="bottom-left" name="poz">
                        <input type="radio" value="bottom-center" name="poz">
                        <input type="radio" value="bottom-right" name="poz">
                    </td>
                </tr>
                <tr>
                    <td>
                    </td>
                    <td>
                        <input type="submit" value="Add">
                    </td>
                </tr>
            </form>

Was This Post Helpful? 0
  • +
  • -

#7 baavgai  Icon User is offline

  • Dreaming Coder
  • member icon

Reputation: 5941
  • View blog
  • Posts: 12,869
  • Joined: 16-October 07

Re: PHP not working on Chrome?

Posted 08 November 2010 - 05:09 AM

Well, your HTML is unfortunate.

Where is the table tag? There are no closings on the input, so we'll assume HTML 4. But then <br/> isn't allowed. Putting h3 in td is sloppy, but I'm not sure if it's illegal. I don't think there's a maxsize attribute.

It sounds like this probably looks ok in the browser you started with and is breaking in chrome? How about firefox? What version of IE did you use?

This is little more than a browser display issue. Use standard html in a standards compliant browser. Be aware the IE6 is a bad place to start and most web developers would advise ignoring it if you can.
Was This Post Helpful? 1
  • +
  • -

#8 ItsGreg  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 11
  • Joined: 31-October 10

Re: PHP not working on Chrome?

Posted 08 November 2010 - 07:26 AM

View Postbaavgai, on 08 November 2010 - 04:09 AM, said:

Well, your HTML is unfortunate.

Where is the table tag? There are no closings on the input, so we'll assume HTML 4. But then <br/> isn't allowed. Putting h3 in td is sloppy, but I'm not sure if it's illegal. I don't think there's a maxsize attribute.

It sounds like this probably looks ok in the browser you started with and is breaking in chrome? How about firefox? What version of IE did you use?

This is little more than a browser display issue. Use standard html in a standards compliant browser. Be aware the IE6 is a bad place to start and most web developers would advise ignoring it if you can.


It's working on Firefox(latest version), and IE 8 - the only reason I tested it was cause it didn't work on chrome.
I tried using only <form tags and it didn't work either...
Was This Post Helpful? 0
  • +
  • -

#9 macosxnerd101  Icon User is online

  • Self-Trained Economist
  • member icon




Reputation: 10821
  • View blog
  • Posts: 40,346
  • Joined: 27-December 08

Re: PHP not working on Chrome?

Posted 08 November 2010 - 07:29 AM

Make sure you run your HTML through a validator, especially when doing work for others. Conforming to standards is going save you a lot of trouble down the road with browser display issues. :)
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1