Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

A PHP problem in my site

Featured Replies

Hi,
I have a problem with my site:
articles4less. com/order

In order to see what I'm talking about, please fill in this page an email address + general guidelines for all articles + subject+words for one article, then click 'continue', and then click 'edit' in the Shopping Cart.

You will see that all the details are there, except of the 'General Guidelines for All Articles' field (textarea). Why is that?


Here are the code of this field:

<textarea id="comments" name="comments" value="<?php
if (isset($articleDetails['comments']) && $articleDetails['comments'] != NULL)
echo $articleDetails['comments'];
?>"/></textarea>


For comparison, here is the code of the email field:

 

<input type="text" id="email" name="email" class="mywidth" value="<?php
if (isset($articleDetails['email']) && $articleDetails['email'] != NULL)
echo $articleDetails['email'];
?>">


Thanks,
Steve

Maybe the forward slash is causing the problem... (last line; see red)...

>"/></textarea>

 

EDIT: On a closer inspection, shouldn't your PHP code be between your <textarea> tags and not part of the value attribute?

 

But maybe not... I should go and see what you're trying to achieve but you scared me when you mentioned filling in a form... :unsure:

Edited by Alluziion

Alluzion is right, there is no value attribute for a <textarea>. You need to encapsulate the comments inside the tags, like this:

 

<textarea id="comments" name="comments"><?php
if (isset($articleDetails['comments']) && $articleDetails['comments'] != NULL)
echo $articleDetails['comments'];?></textarea>

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.