-
Posts
9,409 -
Joined
-
Last visited
-
Days Won
1
Everything posted by MadTechie
-
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 ?
-
Using a HTML form an PHP handler to change a config file
MadTechie replied to rofl90's topic in PHP Coding Help
example ? either that or read in all data from file and then mod it and write databack.. -
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..
-
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 ? :-\
-
a kinda bump can ajax return a javascript function that can then be used ?
-
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
-
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"
-
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..
-
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 !
-
have you got anything so far ? have you done any sql work ? also a file uploader.
-
mail($to, $subject, $body, $realname, $emailaddress);
-
[SOLVED] Quote Script Question - Probabbly Easy!
MadTechie replied to DCXtreme's topic in PHP Coding Help
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) -
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
-
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 ?
-
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
-
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 ?>
-
Quick Question On PHP Register and Login Scripts - MYSQL Error
MadTechie replied to VeronMan's topic in PHP Coding Help
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.. -
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
-
what does <?php var_dump(function_name()); ?> return ?
-
Quick Question On PHP Register and Login Scripts - MYSQL Error
MadTechie replied to VeronMan's topic in PHP Coding Help
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()); -
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>
-
:-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 )
-
i am refering to the [/url] not being a </a> paste it in again but before posting, select the code and click the # button
-
Help! Change Picture at Time of Day with PHP
MadTechie replied to dawnrae's topic in PHP Coding Help
What is going wrong ? script seams fine.. if its not displaying the image then your need to add more of the code -
add <?php fclose($fp); //<--- after this unset($_POST['content']); //<---this ?>