Search found 60 matches

by thallish
Mon Apr 25, 2005 2:17 am
Forum: PHP - Code
Topic: Checking to see if Field was Submitted empty
Replies: 14
Views: 642

Thallish, what's the reasoning behind checking to see if it exists first, and only if it does checking to see if it has a value? For error protection, if all the relevant variables dosen't exist then it can make errors in your code. if for exampel some visitor come from a site other than the site w...
by thallish
Sun Apr 24, 2005 3:30 pm
Forum: PHP - Code
Topic: Checking to see if Field was Submitted empty
Replies: 14
Views: 642

hi i would use isset() for checking if it exist before stripping the $_POST array and then check to see if it's empty if(isset($_POSTї'variableName'])) { if($_POSTї'variableName'] == &quote;&quote;) { echo &quote;Please fill the field that corresponds to the relevant ...
by thallish
Sun Apr 17, 2005 2:19 am
Forum: PHP - Code
Topic: Form help
Replies: 13
Views: 1358

well i think it might be right around this area.. $race = $row['race']; $outcome = $row['outcome']; echo '<form method="post" action="mypage2.php">'; echo '<textarea name="race">'.race.'</textarea>'; echo '<textarea name="outcome">'.outcome.'</textarea>'; Hmm...
by thallish
Sat Apr 16, 2005 3:35 pm
Forum: PHP - Code
Topic: [solved] PHP Includes and HTML
Replies: 4
Views: 391

well your incude file also specifies html tags so if you look at your page source you'll see that you got four html start tags involved and thats certainly wrong try sorting that out :wink: and also you got two body start tags. the way I do it is like the following: What I got is: A file that gets i...
by thallish
Sat Apr 16, 2005 3:20 pm
Forum: Databases
Topic: problem with TEXT field
Replies: 3
Views: 532

hey and thx for your answer. It works now I must have been doing something wrong because the first time I tried to create a table with a TEXT field without a length I also got an error saying something like I should specify one, but something else must have been wrong then.. Oh well it's working now...
by thallish
Sat Apr 16, 2005 11:48 am
Forum: Databases
Topic: problem with TEXT field
Replies: 3
Views: 532

problem with TEXT field

hi I got a problem with setting up a table that includes a text field i phpMyAdmin. The main idea is that the text field is gonna contain text of variable length in my database. (I'm using it for news segments and stuff like that) well here is my code: CREATE TABLE `segment` ( `id` INT NOT NULL AUTO...
by thallish
Wed Apr 13, 2005 4:21 pm
Forum: Javascript
Topic: problem with <pre> tag not aligning text
Replies: 2
Views: 555

hey

thank you for the reply

I finally got to the same conclusion as you with the whitespace by playing around a little. But thanks anyway. and i'll look in on the functions you posted :wink:

regards

thallish
by thallish
Wed Apr 13, 2005 1:06 pm
Forum: Javascript
Topic: problem with <pre> tag not aligning text
Replies: 2
Views: 555

problem with <pre> tag not aligning text

hey all I'm currently playing around with the idea of making my own box where source code is shown. I am using it for smaller code snippets. The page is: http://www.thallish.dk/php_mysql_connect.php As you can see the text in the code box is not aligning left? And that annoys me big time! my CSS cod...
by thallish
Thu Apr 07, 2005 8:50 am
Forum: PHP - Code
Topic: PHP form combobox
Replies: 9
Views: 1929

in line 29 and 30 you have to " that is missing an escape character

change it to:

Code: Select all

<select name=\&quote;sel_type\&quote;>
<option value=\&quote;\&quote;>-- Select One --</option>&quote;;
try to run it after that

/thallish
by thallish
Sat Apr 02, 2005 7:58 am
Forum: PHP - Code
Topic: deleting the last inserted row in DB
Replies: 4
Views: 732

yeah know that :wink: just explained it akwardly. It was meant to be the last inserted row == the one with the highest id. I might as well ask on a suggestion here. I have some tables I want to put some data into. If one insert gets wrong i'll have to correct my previous inserts. Is there a best way...
by thallish
Sat Apr 02, 2005 1:52 am
Forum: PHP - Code
Topic: deleting the last inserted row in DB
Replies: 4
Views: 732

deleting the last inserted row in DB

hey all I have a dream that it one day would be possible to use the following code snippet // the newly inserted row in table 'education' is deleted $query = &quote;DELETE FROM table WHERE id=MAX(id)&quote;; but it's not working. Probably because of the wrong use of the MAX-function(at least...
by thallish
Thu Mar 31, 2005 2:45 pm
Forum: PHP - Code
Topic: Firefox vs. IE
Replies: 2
Views: 725

yep it was that double qoute that did the damage to IE. now it's working fine

thx

thallish :)
by thallish
Thu Mar 31, 2005 2:25 pm
Forum: PHP - Code
Topic: Firefox vs. IE
Replies: 2
Views: 725

Firefox vs. IE

I have a question with some data not being shown correctly in IE. I take some usernames out from a db and then throw them into a selection box. In IE it dosen't show the first name, that should appear in the selection box. Now the funny thing is that, if I use a do-while loop on showing the results ...
by thallish
Thu Mar 31, 2005 2:05 pm
Forum: PHP - Code
Topic: $_POST
Replies: 12
Views: 1177

So the best way to do it would be <?php if(isset($_POST['dog'])){ print "Bark"; } if(isset($_POST['cat'])) print "meow"; } ?> <form> <input type="hidden" name="dog" value="dog" /> </form> <form> <input type="hidden" name="cat" va...
by thallish
Thu Mar 31, 2005 2:03 pm
Forum: PHP - Code
Topic: $_POST
Replies: 12
Views: 1177

hmm just tested it in IE and firefox and there seems to be no problem in that direction. If it turns out to be a problem i must correct it. Well now I just found another troublesome one but that's a different post

thallish