Jump to content

paulman888888

Members
  • Posts

    332
  • Joined

  • Last visited

    Never

Everything posted by paulman888888

  1. sorry i do get ahead of myself. I was trying to get the data between the PHP tags into a variable. I dont think its obc_ anymore. Please help me Thankyou Paul
  2. Hello people; thanks for reading my post I've been trying to catch some data thats not in php tags i know it can be done but dont no how; something like <? obc_start();// guessing here ?> my stuff here that isnt php <? $variable=obc_collect(); obc_close(); ?> i am guessing from what i think i have seen from other scripts Thankyou all Paul
  3. Okay i got CS4 installed and running. Any sites to look up functions? like PHP manual has? Thankyou Paul
  4. hi First i would like to say thankyou for reading my post. I am a PHP programmer (as well as html, css, javascript and more) and i want to know how to use flash. My target is at the end to make games. So My Question; Where do i Start? How long should it take me? (Note: I have Flash MX 2004) Thankyou for your time Paul Hutchinson
  5. Thank you cags. I've had an idea; (Based on what i know about PHP) I thought that the require number can be set then found instead of finding the highest Idea below <html><head><title>Hack Them Questions</title></head><body><script type="text/javascript"> var target =100;// number to find var q = 4//number of possible answers to search var i = 0; I[0][3][0] = new Array('Administration','',0,0,1); I[0][3][1] = new Array('Finance','',0,0,1); I[0][3][2] = new Array('Sales','Yes, that\'s right. The Sales Department deals with all sales enquiries.',1,100,1); I[0][3][3] = new Array('Customer Services','',0,0,1); for(i < q) { if(I[0][3][i][4] == target){ document.write(I[0][3][i][1]); } i=i+i; } </script></body></html> It doesn't work and i will be great full for any help. Thankyou Paul
  6. Yes; i did get abit side tracked. Every time i wrote a word i thought i could do something to make it work. The Question then; i need to compare the 4th parameters to see which one is the highest number. Then show the 1st parameter example I[0][3][0] = new Array('Administration','',0,0,1); I[0][3][1] = new Array('Finance','',0,0,1); I[0][3][2] = new Array('Sales','Yes, that\'s right. The Sales Department deals with all sales enquiries.',1,100,1); I[0][3][3] = new Array('Customer Services','',0,0,1); I want to compare these arrays and check for the 4th parameter and show the 2nd one for the highest. So this should show Sales is the correct answer! Thankyou Paul Once again if i have done something wrong its because i keep trying (and failing) with every new idea which pops into my head. I have prove readed though so it should be fine.
  7. hi; First off thankyou for reading this; Below is code example I[0] = new Array(); I[0][0] = 100; I[0][1] = ''; I[0][2] = '0'; I[0][3] = new Array(); I[0][3][0] = new Array('Administration','',0,0,1); I[0][3][1] = new Array('Finance','',0,0,1); I[0][3][2] = new Array('Sales','Yes, that\'s right. The Sales Department deals with all sales enquiries.',1,100,1); I[0][3][3] = new Array('Customer Services','',0,0,1); I am trying to move away from PHP and start getting more in javascript. I know what i would do in PHP and i know what to do for the first part of the javascript. foreach(i as question){ now am stuck } Also can someone recomend some good sites to learn from not w3school please! Thankyou Paul
  8. Thankyou cags I did it in php and changed it to a table. I used javascript to forward to my php script. Thankyou again Paul
  9. This doesn't answer your question fully but what you could do (and its what i do) is run your code the W3C validator. It will pick up on errors that should solve your issue. I had a simple issue but with IE6 and i fixed it thanks to the validator! hope i helped Paul
  10. hi; First off thankyou for reading my post! I have been trying to match some array's but am not that good at it Below is the code! F = new Array();// Create some where to put all the questions F[0] = new Array(); // Create a question F[0][0] = 'Purchasing'; // Right-hand side text F[0][1] = 1;// Question ID F[1] = new Array();// Create a question F[1][0] = 'Human resources';// Right-hand side text F[1][1] = 2;// Question ID F[2] = new Array();// Create a question F[2][0] = 'Manufacturing or production';// Right-hand side text F[2][1] = 3;// Question ID F[3] = new Array();// Create a question F[3][0] = 'Marketing';// Right-hand side text F[3][1] = 4;// Question ID F[4] = new Array();// Create a question F[4][0] = 'Distribution';// Right-hand side text F[4][1] = 5;// Question ID F[5] = new Array();// Create a question F[5][0] = 'Sales';// Right-hand side text F[5][1] = 6;// Question ID F[6] = new Array();// Create a question F[6][0] = 'Research and development';// Right-hand side text F[6][1] = 7;// Question ID F[7] = new Array();// Create a question F[7][0] = 'Personnel';// Right-hand side text F[7][1] = 8;// Question ID F[8] = new Array();// Create a question F[8][0] = 'Customer services';// Right-hand side text F[8][1] = 9;// Question ID F[9] = new Array();// Create a question F[9][0] = 'Advertising';// Right-hand side text F[9][1] = 10;// Question ID D = new Array(); Create Matching Answers D[0] = new Array(); // Create Matching Answer D[0][0] = 'Buying goods and services from suppliers and negotiating contracts for stock or materials'; // The Answer D[0][1] = 1;// Relative Question ID D[0][2] = 0;// Unknown D[1] = new Array(); // Create Matching Answer D[1][0] = 'Planning the use of staff'; // The Answer D[1][1] = 2;// Relative Question ID D[1][2] = 0;// Unknown D[2] = new Array(); // Create Matching Answer D[2][0] = 'Making the products that the company will sell'; // The Answer D[2][1] = 3;// Relative Question ID D[2][2] = 0;// Unknown D[3] = new Array(); // Create Matching Answer D[3][0] = 'Strategic planning based on market research, product redesign'; // The Answer D[3][1] = 4;// Relative Question ID D[3][2] = 0;// Unknown D[4] = new Array(); // Create Matching Answer D[4][0] = 'Ensuring products and services get to customers'; // The Answer D[4][1] = 5;// Relative Question ID D[4][2] = 0;// Unknown D[5] = new Array(); // Create Matching Answer D[5][0] = 'Making contact with customers and presenting the company\'s portfolio of products and services'; // The Answer D[5][1] = 6;// Relative Question ID D[5][2] = 0;// Unknown D[6] = new Array(); // Create Matching Answer D[6][0] = 'Developing new products and improving current ones'; // The Answer D[6][1] = 7;// Relative Question ID D[6][2] = 0;// Unknown D[7] = new Array(); // Create Matching Answer D[7][0] = 'Recruitment and selection of employees'; // The Answer D[7][1] = 8;// Relative Question ID D[7][2] = 0;// Unknown D[8] = new Array(); // Create Matching Answer D[8][0] = 'Handle enquiries, offer advice and support, and deal with complaints'; // The Answer D[8][1] = 9;// Relative Question ID D[8][2] = 0;// Unknown D[9] = new Array(); // Create Matching Answer D[9][0] = 'Physical promotion of goods and services with campaigns'; // The Answer D[9][1] = 10;// Relative Question ID D[9][2] = 0;// Unknown What am trying to do is get D[n][1] value then show F[value2][0] value "Matches With" D[n][0] n is the current number (the loop untill all is completed) value2 is the value that we got from D[n][1] Sorry if its not very clear! Thankyou All Paul
  11. Hi; Me again! Once again i am having issues with splitting up strings. I would like to know if there is a site (NOT PHP MANEUL! I HAVE TRYED READING THAT IT'S TO LONG!) that can teach me how to spilt up strings. This is what i have been trying (and failling again) to do. I am trying to get this string (which is generated by javascript) into an PHP array! a:3:{s:1:"0";a:2:{s:1:"0";s:10:"Purchasing";s:1:"1";i:1;}s:1:"1";a:2:{s:1:"0";s:15:"Human resources";s:1:"1";i:2;}s:1:"2";a:2:{s:1:"0";s:27:"Manufacturing or production";s:1:"1";i:3;}s:1:"3";a:2:{s:1:"0";s:9:"Marketing";s:1:"1";i:4;}s:1:"4";a:2:{s:1:"0";s:12:"Distribution";s:1:"1";i:5;}s:1:"5";a:2:{s:1:"0";s:5:"Sales";s:1:"1";i:6;}s:1:"6";a:2:{s:1:"0";s:24:"Research and development";s:1:"1";i:7;}s:1:"7";a:2:{s:1:"0";s:9:"Personnel";s:1:"1";i:8;}s:1:"8";a:2:{s:1:"0";s:17:"Customer services";s:1:"1";i:9;}s:1:"9";a:2:{s:1:"0";s:11:"Advertising";s:1:"1";i:10;}} Each {} is an array. I couldn't use the simple way of useing commas as i wouldnt no when the next sub array started and ended! Thank you all Paul
  12. Thanks guys! Also i never new that you could access a string useing array like functions! I dont think i said that in a cleaver way. Want i meant to say was; i never new you could use $string='something'; and access as $string[number]; Great help! Thanks Paul
  13. Hi again; My Quick Question is; is there a easy way to check if the first to characters of a string is equal to a variable? Thankyou All Paul
  14. i know how to use PHP variables but the code i gave you is javascript. I have got my PHP script which collects the html source code from a different page and selects the javascript part. I then need my php script to "parse" (i think thats the right word) so then i can use it in my other PHP scripts. Thankyou all Paul
  15. hi; I am trying to create a PHP script that can read come script. Below is the code i am trying to convert to some PHP can understand L[0] = new Array('','','','W','','','','','','','','','','','','','','T','');// The length of the row and letters WILL change L[1] = new Array('S','E','C','O','N','D','A','R','Y','','R','E','T','R','I','E','V','A','L');// The length of the row and letters WILL change L[2] = new Array('','','','R','','','','','','','','','','','','','','P','');// The length of the row and letters WILL change L[3] = new Array('','','','D','A','T','A','','Q','','','','','','E','X','C','E','L');// The length of the row and letters WILL change L[4] = new Array('','','','','C','','','','U','','','','','','','','','R','');// The length of the row and letters WILL change L[5] = new Array('','','','','R','','Q','U','A','N','T','I','T','A','T','I','V','E','');// The length of the row and letters WILL change L[6] = new Array('','','','','O','','','','L','','','','','','','','','C','');// The length of the row and letters WILL change L[7] = new Array('','','','','S','T','A','T','I','S','T','I','C','S','','','','O','');// The length of the row and letters WILL change L[8] = new Array('','','','','S','','','','T','','','','','','','','','R','');// The length of the row and letters WILL change L[9] = new Array('','','','','','','','','A','','','','L','E','G','E','N','D','');// The length of the row and letters WILL change L[10] = new Array('','I','N','F','O','R','M','A','T','I','O','N','','','','','','E','');// The length of the row and letters WILL change L[11] = new Array('','','','','','','','','I','','','','P','R','I','M','A','R','Y');// The length of the row and letters WILL change L[12] = new Array('','','','','','','','','V','','','','','','','','','','');// The length of the row and letters WILL change L[13] = new Array('','','','','','T','I','M','E','L','Y','','','','','','','','');// The length of the row and letters WILL change I know what i need to do. I need to use wide cards but thats one thing i am not good at. Everything else (well nearly everything. I am not good at PHP with images.) I have had a few goes but they have not been close to working so please dont ask me to show you what i have so far. I have been trying to get each parameter (with or without a letter) in an array like $row[row_number][column_number]='contains of that cell/parameter'; If someone can show me how to just do one line that will be great. Thankyou you all Paul I know it sounds abit open ended and i am sorry for that.
  16. Sorry; your right. Well i have been trying to use Google Visulisation API but its not going very well, i copyed the demo from Google and edited to PHP. It doesn't work at all. I have done everything (that i can think of as well other people ideas) but it just won't work. Thank-you Paul Sorry once again for the 1st bad post, i was so into the ''Zone'' trying to fix the problem.
  17. Hi; First Off thank-you for reading my post. <? $header_scripts.='<script type=\'text/javascript\' src=\'http://www.google.com/jsapi\'></script> <script type=\'text/javascript\'> google.load(\'visualization\', \'1\', {packages:[\'table\']}); google.setOnLoadCallback(drawTable); function drawTable() { var data = new google.visualization.DataTable(); data.addColumn(\'string\', \'Event Name\'); data.addColumn(\'string\', \'Date\'); data.addColumn(\'string\', \'Postcode\'); data.addColumn(\'string\', \'Distance (From: '.$userpostcode.')\'); data.addColumn(\'string\', \'View More\');'; $query = "SELECT * FROM chess_event "; $result = mysql_query($query)or die(mysql_error()); $i=0; $header_scripts.="\r\n".'data.addRows('.mysql_num_rows($result).');'."\r\n"; while($row = mysql_fetch_array($result)){ $header_scripts.='data.setCell('.$i.', 0, \''.$row['name'].'\');'."\r\n"; $header_scripts.='data.setCell('.$i.', 1, \''.$row['day'].'\');'."\r\n"; $header_scripts.='data.setCell('.$i.', 2, \''.$row['postcode'].');\''."\r\n"; $header_scripts.='data.setCell('.$i.', 3, \''.get_latlong_from_postcodes($userpostcode, $row['postcode']).'\');'."\r\n"; $header_scripts.='data.setCell('.$i.', 4, \'<a href="link">More</a>\');'."\r\n"; $i++; // increment counter } $header_scripts.='var table = new google.visualization.Table(document.getElementById(\'table_div\')); table.draw(data, {showRowNumber: true}); } </script>';$body.='<div id="table_div">Loading! Please Wait...</div>';?> Above is my PHP code Below is the output <script> <script type='text/javascript' src='http://www.google.com/jsapi'></script> <script type='text/javascript'> google.load('visualization', '1', {packages:['table']}); google.setOnLoadCallback(drawTable); function drawTable() { var data = new google.visualization.DataTable(); data.addColumn('string', 'Event Name'); data.addColumn('string', 'Date'); data.addColumn('string', 'Postcode'); data.addColumn('string', 'Distance (From: SW10)'); data.addColumn('string', 'View More'); data.addRows(2); data.setCell(0, 0, 'Test Event 4'); data.setCell(0, 1, '2010-02-15'); data.setCell(0, 2, 'Dn16);' data.setCell(0, 3, '148 miles'); data.setCell(0, 4, '<a href="LINK">More</a>'); data.setCell(1, 0, 'Test Event 3'); data.setCell(1, 1, '2009-01-01'); data.setCell(1, 2, 'Dn16);' data.setCell(1, 3, '148 miles'); data.setCell(1, 4, '<a href="LINK">More</a>'); var table = new google.visualization.Table(document.getElementById('table_div')); table.draw(data, {showRowNumber: true}); } </script> Please Can Someone tell me what i have done wrong. Thank-you All Paul
  18. Sorry about my last post. It was very bad. in the head i have <script type="text/javascript"> var uploaded=0; var uploads=1; function start_uploads(){document.forms["form_image_"1].submit()} function upload_completed(){ document.last.submit(); } function check_uploads(){ if(uploaded==uploads){ upload_completed(); }} function upload_complete(id){ var x=document.getElementById("image_upload_result"+id); x.innerHTML="Upload Complete"; uploaded+=1; check_uploads(); } </script> and in the <body> i have <div id="image_upload_result1"> <form method="post" action="mysite.com/?page=Gallery&action=Uploader" target="the_uploader_1" name="form_image_1"> <input type="hidden" name="MAX_FILE_SIZE" value="4608" /> <input type="hidden" name="id" value="1" /> <p class="meta">Image <b>1</b> </p>Image Name; <input name="image_name" value="" /> <br />Image Desc; <input name="image_desc" value="" /><br /> <input type="file" name="image"/> <iframe id="uploader_1" name="the_uploader_1" style="width:0px; height:0px; border: 0px" src=""></iframe> <br /><br /></form></div> <a href="javascript:void(0);" onClick="start_uploads();">Start Uploading</a> As you may see i have been trying to upload a image into a hidden IFRAME. Please can someone point out where i have gone and some good sites to learn form. I have already gone though w2schools about 5 times. Thankyou all in advance Paul
  19. hi; i have been trying to learn javascript and think i understand i tiny bit. I know my code below will not work but i have been trying, but i am losing my will to live. <script type="text/javascript"> var uploaded=0; var uploads=10; function check_uploads(){ if(uploaded=uploads){ upload_completed(); }} function upload_completed(){ copy_variables(); submit.form.MYFORMID; } function copy_variable(){ form.copy_to_me.fieldid.value=form.formid.fieldid.value; } </script> Can someone make this in to a script that will work please syntax-wize anyway. I think i would be able to make my whole script work if i had an example piece of code. Also if i have an iframe and want to add to a variable thats in not in the iframe, do i need to do anything more then if it wasn't. I very sorry for my bad word but i am trying to learn. Please don't to nasty. Thankyou all Paul
  20. sorry i found the error. i had a get command updating it sorry for any time wasted
  21. its set in my index file. My index.php inlcludes every other page on it. i did this is a test to see where the error was lyeing. index.php $userdata['postcode']='SW10'; include'page.php'; page.php <?php $userpostcode=$userdata['postcode']; $page_title='Events'; echo 'test; '.$userpostcode; $page_subtitle='Showing All '; $userpostcode=$_REQUEST['postcode']; $header_scripts='<script src="'.$site_location.'/js/sorttable.js"></script>'; $query = "SELECT * FROM chess_event ";if(isset($_GET['when'])){ $only=strtolower($_GET['when']);$when=$only;if($only == 'upcoming'){$page_subtitle.=' Upcoming'; $query.= " WHERE day > CURDATE()";$page_title.=" - Upcoming"; }elseif($only == 'past'){ $page_subtitle.=' Past';$query .= " WHERE day < CURDATE()";$page_title.=" - Past";}}else{$page_title.=" - All";} $result = mysql_query($query)or die(mysql_error()); $page_subtitle.=' Events'; $body.='<table border="0" width="100%" cellspacing="0" class="sortable">'; $body.="<tr><th>ID</th><th>Event Name</th><th>Date</th><th>PostCode</th><th>Distance from ".$userpostcode."</th><th>View Event</th></tr>"; while($row = mysql_fetch_array($result)){ $body.="<tr>"; $body.='<td><center><a href="/?page=View_Event&id='.$row['id'].'">'.$row['id']."</a></center></td>\n"; $body.="<td><center>".$row['name']."</center></td>"; $body.="<td><center>".mysql2uk($row['day'])."</center></td>"; $body.="<td><center>".$row['postcode']."</center></td>"; $body.="<td><center>".get_latlong_from_postcodes($userpostcode, $row['postcode'])."</center></td>"; $body.='<td><center><a href="/?page=View_Event&id='.$row["id"].'">More</a></center></td>'; $body.="</tr>"; $i++; // increment counter }$body.="</table>"; ?> And on the 3rd line it echo-ed the $userpostcode but not on the lines below it. Why? where has this variable gone? Thankyou in advance again Paul
  22. hi; My variable $userpostcode is no being passed on from line 2; ($userpostcode=$userdata['postcode'] to line 15 ($body.="<tr><th>ID</th><th>Event Name</th><th>Date</th><th>PostCode</th><th>Distance from ".$userpostcode."</th><th>View Event</th></tr>" or any line after that. I don't understand! To check i echo after line 2 to see if there way a variable in $userpostcode and there was. Everything else added to $body is echo later and i can see it all but that 1 variable isn't showing at all. Why? Please please please help me. Code <?php $userpostcode=$userdata['postcode']; $page_title='Events'; $page_subtitle='Showing All '; $userpostcode=$_REQUEST['postcode']; $header_scripts='<script src="'.$site_location.'/js/sorttable.js"></script>'; $query = "SELECT * FROM chess_event ";if(isset($_GET['when'])){ $only=strtolower($_GET['when']);$when=$only;if($only == 'upcoming'){$page_subtitle.=' Upcoming'; $query.= " WHERE day > CURDATE()";$page_title.=" - Upcoming"; }elseif($only == 'past'){ $page_subtitle.=' Past';$query .= " WHERE day < CURDATE()";$page_title.=" - Past";}}else{$page_title.=" - All";} $result = mysql_query($query)or die(mysql_error()); $page_subtitle.=' Events'; $body.='<table border="0" width="100%" cellspacing="0" class="sortable">'; $body.="<tr><th>ID</th><th>Event Name</th><th>Date</th><th>PostCode</th><th>Distance from ".$userpostcode."</th><th>View Event</th></tr>"; while($row = mysql_fetch_array($result)){ $body.="<tr>"; $body.='<td><center><a href="/?page=View_Event&id='.$row['id'].'">'.$row['id']."</a></center></td>\n"; $body.="<td><center>".$row['name']."</center></td>"; $body.="<td><center>".mysql2uk($row['day'])."</center></td>"; $body.="<td><center>".$row['postcode']."</center></td>"; $body.="<td><center>".get_latlong_from_postcodes($userpostcode, $row['postcode'])."</center></td>"; $body.='<td><center><a href="/?page=View_Event&id='.$row["id"].'">More</a></center></td>'; $body.="</tr>"; $i++; // increment counter }$body.="</table>"; ?> Thankyou in advance Paul
  23. hi; I have being working on a website and it works but i have never made a website that handles money. So where is the best place to start with PHP and money transitions? Thankyou Paul
  24. Is there a way to convert data already in the table to this format? Dathremar; It doesn't work but thankyou all the same. Thankyou all Paul
  25. hi; I inserted my date into a normal text in the format of DD-MM-YY and i want to use the where in mysql. Example; SELECT * from table WHERE thedate > todays date What i am trying to ask for is a different way of finding days that are before today in mysql. Thankyou Paul
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.