Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7952365
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T02:50:26+00:00 2026-06-04T02:50:26+00:00

I am trying to convert a client’s site from ColdFusion to PHP. I am

  • 0

I am trying to convert a client’s site from ColdFusion to PHP. I am trying to replicate one of old scripts scripts where the values of a form are inserted into a mysql db. I could not get mine to work so I tried simply echoing a value and found that it was not showing the entire value. For example I typed in 11/13/2011 in one field and Hike in another and the output was 110.

I’m not sure why its storing text as a number. Even if I change it to echo just the Hike it outputs 0. Here is my code:

HTML:

<form action="file.php" method="post">
  Event Date: <input type="text" name="eventdate" size="30" />
   Theme: <input type="text" name="theme" size="50" />
</form>

PHP:

<?php
    $eventdate = $_POST['eventdate'];
    $theme = $_POST["theme"];
    echo $eventdate+"<br />";
    echo $theme+"<br />";
?>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T02:50:28+00:00Added an answer on June 4, 2026 at 2:50 am

    Your problem is that you are adding the fields together, not concatenating with the dot operator: .

    echo $eventdate."<br />";
    echo $theme."<br />";
    

    PHP will attempt to coerce variables that are not the same type but joined in an operation into types that make sense (for instance, if you’re attempting to add a floating point number to an integer, it will evaluate the integer as a floating point number when performing the operation).

    For more information, see the documentation entry for Type Juggling and how PHP Converts Strings to Numbers

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to convert a php file (client.php) from utf-8 to iso-8859-1 and
We are trying to convert out old school client server application into a N-Tier
I'm trying to convert code from a WFA (Windows Form Application) over to a
I'm trying to point a subfolder from one domain to another on my vhost
I'm trying to convert an ASP.Net web service to WCF application. The client is
I am trying to use JSON and HTTP client to retrieve data from a
I've been trying to send a packet from a client to a server via
I'm trying to send some data from a C++ server to a C# client.
I'm having the following problem: cannot convert from 'MyProject.DataLayerServiceRef.MyDTO' to 'WCFService.MyDTO' when i'm trying
I'm trying to send XML doc to server from client. But when server get

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.