[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Amazing shape

Posted on 2003-11-11
9
Medium Priority
?
382 Views
Last Modified: 2008-03-06
Hi guys,
I do not know if this is the right place to post this but I did
not know what to do.
I am trying to draw the shape below using the HTML text field
as each square is a text field even the shapes that look together
like a permid they are (suppose to be text fields rotated 45 degrees).

The user will have to insert values inside these text fields.

I am using PHP and MySQL.
I know this is something crazy but this is what I have to do

Any help will be appreciated.
Links books any thing.
Thank you in advance.

      /\
     /\/\
    /\/\/\
   /\/\/\/\
  /\/\/\/\/\
 /\/\/\/\/\/\
/\/\/\/\/\/\/\
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
0
Comment
Question by:FNajjar
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
9 Comments
 
LVL 13

Accepted Solution

by:
lozloz earned 1000 total points
ID: 9723205
hmm so the /\ represents one text field rotated 45 degres an | | represents a normal text field? as far as i know you can't rotate elements in a form (i've never seen it).. can you tell us what you're trying to do so we might be able to suggest some alternatives?

cheers,

loz
0
 
LVL 14

Assisted Solution

by:ThG
ThG earned 1000 total points
ID: 9723317
very simple recursive algorithm! This really sounds as school/college homework, so i'm not going to do that for you, but i'll help in writing the code.

Basically they're 3 nested fors:

for ($i = 1; $i <= $len; $i++) {
  for ($j = 1; $j <= $len - $j; $j++) {
    print " ";
 }
 ...
}

i'll let you complete it!
0
 

Author Comment

by:FNajjar
ID: 9723344
You got the idea right,

It is suppose to be a simple program with no calculations that I only need to draw the table
on a web page and the user will have to insert his values in the shape you've seen
of course the shape is a dynamic shape according to the number of rows and columns
the user will set at the begining of the program.

I thought of drawing the square shape in photoshpo then rotate it 45 degrees then read the
image inside each cell of the table and inside that i will put the text field...   :) crazy ha

I couldn't think of any thing else, can you.
Thank you.
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Author Comment

by:FNajjar
ID: 9723381
I am not worried about the shape but as I said they are text fields they are not just /\ slashes
and these text fields will have values inserted by the user.

At school/college homeworks they use to tell us read the question carefully.
I will be more than happy if it turns to be a school/college homework - beleive me... :)
0
 

Author Comment

by:FNajjar
ID: 9724613
Okay guys,
Does anyone know if this could be done in any other language
I'm willing to do any thing to make it work.
Thank you.
0
 
LVL 13

Expert Comment

by:lozloz
ID: 9724897
as i said, i can't think of any way to rotate an html object, let alone an input field. you'd probably be best off moving this to the javascript forum to see if they have any answers

loz
0
 

Author Comment

by:FNajjar
ID: 9725432
Okay,
Thank you guys much.
I'll try Javascript.
0

Featured Post

Tech or Treat!

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
The viewer will learn how to count occurrences of each item in an array.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Suggested Courses

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question