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

  • Home
  • SEARCH
  • 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 4602278
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T23:57:34+00:00 2026-05-21T23:57:34+00:00

i wrote this code. in this code we user guess a number then program

  • 0

i wrote this code.
in this code we user guess a number then program checked the number with the number that i gite to it and print appropriates message.
when i start program it shows welcome that is true but when i entered number in it always it shows little in output but it isn’t true.

   $val = '42';
$gues ;
if(!isset($gues))
$mess =  "welcome<br>";
elseif($gues > $val)
$mess =  "bigr<br>";
elseif($gues < $val)
$mess =  "little<br>";
else
$mess =  "win<br>";

$gues = @(int) $gues;



?>
<html>
<head><title>bazi riazi</title></head> 
<body>
<h1>
<?php print $mess;
?>
</h1>
<form method="POST">
type you gues here:<input type="text" name='gues'>
</form>


</body>
</html>
  • 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-05-21T23:57:35+00:00Added an answer on May 21, 2026 at 11:57 pm

    How your var $gues get value from form? Did you use $_POST['gues'] first?

    Script always print little because probably variable $gues was not initialized any value (default is zero, I suppose…).

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

Sidebar

Related Questions

In the below code ,the mails that are going from the system are going
I am learning python atm, and was doing an exercise from this site --
I have a network share in the intranet that allows write access to everyone
In this question's answers someone can find many sites (like ideone ) allowing a
I am learning JAVA and trying to write my first loop. The loop should
I've set up a REST service and client in PHP and I'm having a
I'm trying to add many series to a chart using VBA, as in the
Im attempting to write a new component descendant from a common component (TDateTimePicker). My
I'm trying to write a facebook application using Java tomcat with RestFB. the restfb
I have two parameters fL and fV , both functions of T and P.

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.