paulman888888
Members-
Posts
332 -
Joined
-
Last visited
Never
Everything posted by paulman888888
-
Am using SQLite3. I have read abit of that as well but i cant et my head around it can someone make a simple example please with lots of comments. I find it easyer to learn via examples. Thankyou all Paul
-
I made my connection to my MySQL database, but how do i connect to SQLite? I have no knowlegde what so ever SQLite. Is there a site i can learn the basics from? Thankyou Paul
-
Hi everyone, I installed a application that uses SQlite3 and no other. What i want to do is to Keep Mysql database the same as the SQlite. Why? Because i understand Mysql syntax. I don't no how to copy SQlite3 database to Mysql? I think i would 'TRUNCATE TABLE' the table then some sort of loop that takes data from SQlite and INSERTS it into The MySQL. Please Help Thankyou Paul
-
There is no mysql code on line 3. full code is error http://rockworld.atzend.com/songs/test.phps Why does is say theres an error on line 3 when theres no Mysql script there? I thankyou so much for the help Paul
-
I upload a file from my application but dont give it a variable name. How do i get PHP to find the file without me telling it the variable name? Thankyou Paul
-
I no this is probly turning into a maths question but how would i do the math. I think something like this; votes divided by number of votes times by 100. Would that get rating out of a 100? Thankyou Paul
-
I have my Table but i would like to add a extra coloum for rating. Am not fused how it works but i cant think how to make it. If someone rates it 10 shall i add 10 to the score? Not very good because i cant have x/10 Do i add 2 extra coloums 1 have the rating and 1 how many votes. I dont no the math to work everything out! Am stuck and would like any ideas, i can add as many coloums need but i dont want to make a new table. Thankyou Paul
-
IT WORKS! THANKYOU
-
I have been trying to make a little script that will look in a MYSQL database and see if there is username and password in the same row. If there is then echo 'blah'; and if not, echo 'blah blah'; So far i have this but as you can tell its a little messy, and i dont know how to do the IF there is a 'username and password' part. $result=mysql_query("SELECT * FROM user_man WHERE name = '$username' AND password = '$password'"); or die('error'); Thankyou for all help Paul
-
OK first off: i know this is the wrong section. But its the only place i might get an answer. Now for the question. I would like a qualification that i can put on my CV. But where can i get one? everywhere i look you can get a certificate but that's not recognized by most employers Thankyou Paul
-
I have my php script, the script looks in mysql database and finds the file name. Then echos each line, (except the 7 lines i didnt want it to read). The problem is that i get a Request Entity Too Large (a 413 error). The script should work but how do i get rid of the 413 error? I removed the read file part of the script and it worked. So i think i need to change the bottom part of my script. My script <?php $where = isset($_REQUEST['id']) ? "WHERE `id` = '".mysql_real_escape_string($_REQUEST['id'])."' " : ""; $result = mysql_query("SELECT * FROM chess_games $where ORDER BY id ASC"); $row = mysql_fetch_array( $result ); $file = '../user/'.$row['pgn_file'];//This is my file read part. I think this is the problem $fh = fopen($file,"r"); $line = 1; while(!feof($fh)){ if($line > 7){ fgets($fh); $line++; }else{ echo $data; } $line++; } echo $data; ?>
-
I did something llike this yesterday. I used to forms. Form 1 to get how many fields are in the second. Form 2 what ever you want form1 <form> <input type="text" name="moves" id="moves"> <input onClick="step2.php" type="submit" name="step" id="step" value="Next Step"> </form> Form 2 $moves=$_POST['moves']; for ($i=1; $i<=$moves; $i++) { echo'<tr><td width="50%"><span id="sprytextfield1"><label> '.$i.') <input name="white_move_'.$i.'" type="text" id="white_move_'.$i.'" size="9"></label> <span class="textfieldRequiredMsg">A value is required.</span><span class="textfieldMinCharsMsg">Please Enter Whites Move.</span></span></td>'; echo'<td width="50%"><span id="sprytextfield2"> <label><input name="black_move_'.$i.'" type="text" id="black_move_'.$i.'" size="9"> </label> <span class="textfieldRequiredMsg">A value is required.</span><span class="textfieldMinCharsMsg">Please Enter Blacks Move</span></span></td></tr>'; } You have to replace everything but the backbone is there
-
How do i when reading a file ship the 1st 6 lines? I have looked on google and php.net Thankyou Paul
-
This is properly got a easy answer. I would like to know how to add strings in a loop. For example <?php $i = 1; while(true) { if (!isset($_POST["white_move_".$i])){ $move = $i. '.' .$_POST["white_move_".$i]//post=e then the next time =gh $i++; }} ?> So that $move will get bigger and bigger and not replaced by the next go round the loop. Hope you understand Thankyou Paul
-
If its for novices why didnt you explain what each line does, Thats the idea of an example. And you didnt a common.php page the page that keeps all the sessions and stuff intact.
-
Just to confirm. Ill put that in my code and when theres no more white_move_$1 the loop will stop? I like that. Thankyou very much Paul
-
assigning CSS to different MySQL column values
paulman888888 replied to webguync's topic in PHP Coding Help
and if you want to do changeing class then you can use this while(something) { // alternate class $class = ($i%2 == 0) ? 'one class' : ' 2 class; // Print out the contents of each row into a table echo "<tr class='".$class."'>"; $i++; // increment counter And all that would do is; use class 1 then class 2 then class 1 then class 2 and so on -
Good idea but like i said there wont be a sent number of textareas. There may be 4 sometime and 66 other times. So i think i need some kind of loop to find out how many textareas i have got and then use your code. Hope you understand Thankyou Paul
-
Start again! What is the problem? You never told us what you wanted help with in the first post. Please can you tell us more
-
I have my form and the form changes everytime. The form may have 12 textareas or something 24. What I would like to know is how do i collect all data from all text area into 1 string? heres my form <?php //this is the important part for ($i=1; $i<=$moves; $i++)//the $moves will change all the time { echo'<tr><td width="50%"><span id="sprytextfield1"><label> '.$i.') <input name="white_move_'.$i.'" type="text" id="white_move_'.$i.'" size="9"></label> <span class="textfieldRequiredMsg">A value is required.</span><span class="textfieldMinCharsMsg">Please Enter Whites Move.</span></span></td>'; echo'<td width="50%"><span id="sprytextfield2"> <label><input name="black_move_'.$i.'" type="text" id="black_move_'.$i.'" size="9"> </label> <span class="textfieldRequiredMsg">A value is required.</span><span class="textfieldMinCharsMsg">Please Enter Blacks Move</span></span></td></tr>'; } On my collection page where all infomation is sent. How would i retieve all the form information? I would like to collect the results like this. (number). (value of white_move_#) (value of black_move_#) # will change all the time. I hope i didnt sound to confuseing. Thankyou Paul
-
So no-one has any help what-so-ever
-
Do you mean like a shopping cart? I dont know what you mean but your code looks fine. Or do you want to echo it out in a table?
-
Am not sure where this topic should go but i think its in the right place. The problem is that i am trying to make some sort a fixtures table, for my local chess club. Offtopic: If you dont know chess fixture;, its like football, 2 teams but 4 people on each team. What i hopeing to acheive is; when the fixture table is made it will show TEAMS vs TEAMS. Then you can click the a team it will show you the teams matchs. After that you can click the match and it will show you whoese playing. Sorry if its hard to understand. I know what i would like but not a clue to make it happen. Please can you give me advise (or a link) on how to make this happen. Thankyou all very much Paul
-
Thankyou I know that imagemakick is not install. Plan B; can The GD lib convert image filetypes? thankyou Paul
-
I have had a look on Google and there's a few things about image converting. But they all use ImageMagick. 1) How can i find out if Imagemagick is installed on the serve (I don't own the server) 2) I know i have the GD install so can i convert images use the GD library? Thankyou Paul