Jump to content

MadTechie

Staff Alumni
  • Posts

    9,409
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by MadTechie

  1. So your writting to a php file.. erm.. !!! why? i am guessing you didn't write the "my admin panel" how does that store its settings ?
  2. example ? either that or read in all data from file and then mod it and write databack..
  3. yep.. but as you havn't given anyone anything to work with i guess we're all just have to magically write the whole thing for you, also if you need any dishes washed just say..
  4. Ohh my... That looks great (hard for me, but great) right i am not using document.write (don't plan to but you never know) but i am outputting html+javascript now i'm not great at javascript (or ajax) so if i am reading the post correctly and i got a little lost at 4 i hate to ask but i don't surpose you have an example i can up apart ? :-\
  5. a kinda bump can ajax return a javascript function that can then be used ?
  6. the random number is just a quick cheap way of check to see if the current post data has been sent already, its just a sample script and it works
  7. try this SELECT *, COUNT(column) theCounter FROM blah blah blah WHERE blah blah blah GROUP BY member this will change the column name to "theCounter"
  8. No using the example date it would give you this entry image body text1 aa.jpg body text1 bb.jpg body text1 cc.jpg body text2 dd.jpg so maybe use SELECT entries.id, entries.entry, images.image FROM entries, images WHERE entries.id = images.rel_id returns id entry image 2 body text1 aa.jpg 2 body text1 bb.jpg 2 body text1 cc.jpg 3 body text2 dd.jpg remember this is just 1 query, you could aways create a loop to then build this into a array..
  9. So SELECT entries.entry, images.image FROM entries, images WHERE entries.id = images.rel_id can you post a little code if this doesn't help !
  10. have you got anything so far ? have you done any sql work ? also a file uploader.
  11. MadTechie

    email?

    mail($to, $subject, $body, $realname, $emailaddress);
  12. one quick way.. <?php //....Snip $activity_price = 0; break; } $theNames .= $activity_name; // <--- Add this //PRICE THE ACTIVITY X NUMBER OF PERSON $activities_totalprice =+ $activity_price*$activity_peopleNum; //.....Snip ?> Add $theNames in the $body (by the email)
  13. how are your tables setup ? this is what i would do.. member table ID UserName 1 Test1 2 Test2 Images Table ImagePath UID /images/test1.jpg 1 /images/test2.jpg 2 /images/test3.jpg 1 /images/test4.jpg 1 /images/test5.jpg 4 SELECT Images.ImagePath FROM Images, member WHERE member.ID= Images.UID AND member.UserName = 'Test1' result /images/test1.jpg /images/test3.jpg /images/test4.jpg *untested
  14. any help would help I have a form that starts with 1 drop down box, after the user selects a value from the first drop down ajax loads up the next drop down box etc etc now the question i have a javascript function that builds the url for http_request.open('POST', url, true); see below function get(obj) { var poststr = 'Data1=' + encodeURI( document.getElementById('Data1').value ); makePOSTRequest('test2.php', poststr); } this seams to work fine except i have to add a few functions to the page (each including the var's i wish to send) i wanted to use ajax to return the form objects and the javascript to use with it, but it fails. OK i have probably confused everyone (including myself) so a simple question, can ajax return a javascript function that can then be used ?
  15. family table [/td] Position Age Dad 41 Mom 45 food Table Meal Age Steak Dad Mom SELECT food.Meal, family.Position FROM family, food WHERE food.Position = family.Position or use Joins
  16. What about doing this instead, creatre in the location instead of moving it.. require 'PDF.php'; // Require the class. $filename = 'foo.pdf'; $fullpath = "uploads/".$filename; $pdf = &PDF::factory('l', 'a4'); // Set up the pdf object. $pdf->open(); // Start the document. $pdf->setCompression(true); // Activate compression. $pdf->addPage(); // Start a page. $pdf->setFont('Arial', '', 36); // Set font to courier 8 pt. $pdf->text(25, 50, 'Supreme Grand Royal Arch Chapter of Scotland'); // Text at x=100 and y=100. //$pdf->setFontSize(20); // Set font size to 20 pt. //$pdf->setFillColor('rgb', 1, 0, 0); // Set text color to red. //$pdf->line(200, 100, 200, 100); // Draw a line. $pdf->setFont('Arial', '', 12); // Set font to courier 8 pt. $pdf->text(250, 100, 'DEGREE OF INSTALLED MASTER IN THE MARK DEGREE'); // Text at x=100 and y=100. $pdf->setFont('Arial', '', 24); // Set font to courier 8 pt. $pdf->text(275, 130, 'Certificate of Innstallation'); // Text at x=100 and y=100. //$pdf->setDrawColor('rgb', 0, 0, 1); // Set draw color to blue. //$pdf->setFillColor('rgb', 1, 1, 0); // Set fill/text to yellow. //$pdf->rect(200, 300, 100, 100, 'fd'); // Draw a filled rectangle. //$pdf->addPage(); // Add a new page. $pdf->setFont('Arial', 'BI', 12); // Set font to arial bold //$pdf->text(100, 100, 'Second page'); // Text at x=100 and y=100. //$pdf->image('sample.jpg', 400, 100); // Image at x=50 and y=200. //$pdf->setLineWidth(4); // Set line width to 4 pt. //$pdf->circle(200, 300, 150, 'd'); // Draw a non-filled $pdf->output($fullpath); // Output the file named foo.pdf ?>
  17. the Entries i have no idea, mut have ID 1 and 2, i asked if you had and SQL file, sometimes developer dump the database setup to a SQL file you can just import into phpmyadmin and it does the work for you.. either that or a detailed doc..
  18. how are you creating the PDF is the main question.. yes its possible but route depends on how you are creating the PDF, worst case i guess you could just us ob_flush
  19. what does <?php var_dump(function_name()); ?> return ?
  20. in the Table codes their should be a field called code But also their should be 2 entries.. with you created these manually was a sql file supplied ? # check if activation code is correct $q1 = mysql_query("SELECT code FROM codes WHERE id = 1") or die(mysql_error()); $q2 = mysql_query("SELECT code FROM codes WHERE id = 2") or die(mysql_error());
  21. what about adding a session, to stop them ie <?php session_start(); ?> <form action="" method="post"> <?php $temp = rand(1,1000); echo "<input name='temp' type='hidden' value='$temp' />"; if(($_POST['temp'] != $_SESSION['tmp1']) ) { echo "COOL"; //add entry etc }else{ echo "BAD"; //don't add } $_SESSION['tmp1'] = $_POST['temp']; ?> <input name="" type="submit"> </form>
  22. :-X How did i not spot that... it was either the 5am time here making me think it was echoing.. if ($gp['gp_pay']) {$gp_pay="<a href='yourgang.php?action=staff&act2=masspayment'>Mass Payment</a>";} if ($gp['gp_pay']) {$gp_pay="<a href='yourgang.php?action=staff&act2=masscpayment'>Mass Crystal Payment</a>";} change the 2nd $gp_pay to $gp_payc (or whatever) the find where $gp_pay is being used and repeat for $gp_payc, (credit to HaLo2FrEeEk )
  23. i am refering to the [/url] not being a </a> paste it in again but before posting, select the code and click the # button
  24. What is going wrong ? script seams fine.. if its not displaying the image then your need to add more of the code
  25. add <?php fclose($fp); //<--- after this unset($_POST['content']); //<---this ?>
×
×
  • 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.