volka wrote:It's not laziness, I just don't trust your small code snippets and the arbitrary output. And I knew this would be code-hide-and-seek from the beginning. Nothing personal, just experience. And as usual in such case the "hidden" code is erroneous and unstructured. My guess is
that is why people are so protective and secretive when it comes to posting code. And as usual there is no quick answer like "remove the second xyz".
Let's start with the form code. String literals in php can span more than one row. Let's use this to bring a little more structure to the html code.
Code: Select all
if ($_POST['submit']) {
for($a = 0; $a <= 9; $a++) {
echo '<table>
<form method="POST" action="yourfile.php">
<!-- missing tr element -->
<td align="center" width="188" style="border-style: solid; border-width: 1px">
<input type="text" name="afm' , $a , '" />
</td>
<td align="center" width="188" style="border-style: solid; border-width: 1px">
<input type="text" name="surname', $a, '" />
<input type="hidden" name="submit" value="1" />
<input type="submit" value="Insert" />
<!-- missing /td, missing <tr -->
</form>
<!-- missing /table -->
';
}
}
please correct the errors and indent the second form code accordingly.
p.s.:
UrButtFullOfArr0ws wrote:it might have a mistake or two but i didn't copy-paste all of it.
Of course you didn't.
First off, the "all of it" was refering to the code for just those 2 columns.... i don't see the need to show you anymore columns becouse that's pointless and would slow down anyone who is trying to work this out.
Second, why should i give my whole code away open to the public when tons of users visit this site daily and one of them might see my site and he "might" decide to check out my security gaps.... I said "might" as that's a not a really high probability but not willing to take chances at all. "Weak security" but not "No security".
Thirdly, the problem couldn't possibly be in the rest of the code... Let's say it was my "Name" column wrong (just making a wild guess):
1) it couldn't affect the very first column
2) even if it affected it, it wouldn't turn it to 0 or 1 (still no idea why 0 or 1)
3) All of the other columns wouldn't work at all
and
4) I'd get a mysql error if the mysql syntax was wrong
Of course you didn't.
Why are you in this mood??
Anyway... If that php code was my code you were refering to, then i'd have to tell you that i manually rewrote it like that out of boredom... that wasn't entirely copy-paste i just read the code from my mind (checking at times with the actual code) and i wrote it, becouse it was faster then copy-pasting and then adjusting.
And what do you mean with "missing tr" or "missing </table>"... those aren't missing in my actual code. Duh..
P.S.:
UrButtFullOfArr0ws wrote:i don't see the need to show you anymore columns becouse that's pointless and would slow down anyone who is trying to work this out.
Pointless as in ALL of the other columns are written in the same way.
P.S.S: I've double-checked and triple-checked and quadruple-checked for syntax errors and i've found none. And btw you asked for a code to copy-paste to a file and run it... not for my very own code. I just want to think that the error(s) is(are) in the logic and not in the actual code.
volka wrote:Ok, pointless. Good Luck.
Ehm... ya... whatever...
I don't wanna turn this into a flame war but, wth is your problem???
Would adding TONS OF USELESS code help you??... i've checked for syntax errors 1000 times before i even posted here. Geeze. Tyvm btw.
volka wrote:It's not laziness, I just don't trust your small code snippets and the arbitrary output. And I knew this would be code-hide-and-seek from the beginning. Nothing personal, just experience. And as usual in such case the "hidden" code is erroneous and unstructured. My guess is that is why people are so protective and secretive when it comes to posting code. And as usual there is no quick answer like "remove the second xyz".
*cough*all knower my butt*cough* why do you have to act like one?... Excuse me when i say, you've got knowledge about PHP and MySQL (at least that's what the posts show) in my eyes but not about people.
I know you guys over here are doing (as far as i know) voluntary work but that doesn't mean you can really just throw us to the garbage if you don't like what i'm saying...I hope im not talking about everyone that helps ppl out when i say "you" but that's my impression...
Anyway i'm getting off-topic, so is any1 willing to help?
