-
Posts
9,409 -
Joined
-
Last visited
-
Days Won
1
Everything posted by MadTechie
-
[SOLVED] Functions in classes returning/accessing variables
MadTechie replied to Yesideez's topic in PHP Coding Help
change $this->$arrGenders to $this->arrGenders <?php class clsHTML { var $arrGenders=array('X','Male','Female','Both'); function makeoptsGender() { $optGender=''; for ($i=1;$i<count($this->arrGenders);$i++) { $optGender.='<option value="'.$i.'">'.$this->arrGenders[$i].'</option>'; } return $optGender; } } ?> -
Session variables work on one page but not another...Help
MadTechie replied to modigy's topic in PHP Coding Help
well he may have have session.auto_start turned on .. bad pratice but still possible -
cookie or sessions would work
-
Add a field for the month set it to 1-12 (for each month) then on the page that displays the details from the database add $theDate= getdate(); "SELECT * from table WHERE month = ".$theDate['mon'];
-
Ahh no no the whole page is <?php // The file $filename = $_GET['img']; $percent = 0.5; // Content type header('Content-type: image/jpeg'); // Get new dimensions list($width, $height) = getimagesize($filename); $new_width = $width * $percent; $new_height = $height * $percent; // Resample $image_p = imagecreatetruecolor($new_width, $new_height); $image = imagecreatefromjpeg($filename); imagecopyresampled($image_p, $image, 0, 0, 0, 0, $new_width, $new_height, $width, $height); // Output imagejpeg($image_p, null, 100); ?> Nothing more nothing less remove the <html> etc etc etc
-
other tests to try are put test.jpg in the same folder and then try http://mydomain.com/mysite/test/image.php?img=test.jpg if this fails comment the line //header('Content-type: image/jpeg'); try again you may see alot of gook appear but at the top you may see a error with the file path
-
First check the first line of image.php is <?php can you post or pm a link to your site (if online) i'll take a quick look
-
[SOLVED] how to create link in php ?? pass value from .php to .php
MadTechie replied to UnrEALMe's topic in PHP Coding Help
Using post is common in forms.. heres an example (this also emails you the data passed) Form to mail -
Use imagecopyresampled either edit the code to create a new file or use as is image.php <?php // The file $filename = $_GET['img']; $percent = 0.5; // Content type header('Content-type: image/jpeg'); // Get new dimensions list($width, $height) = getimagesize($filename); $new_width = $width * $percent; $new_height = $height * $percent; // Resample $image_p = imagecreatetruecolor($new_width, $new_height); $image = imagecreatefromjpeg($filename); imagecopyresampled($image_p, $image, 0, 0, 0, 0, $new_width, $new_height, $width, $height); // Output imagejpeg($image_p, null, 100); ?> use as <img src='image.php?img=test.jpg' />
-
but does it support aspX.. also correct me if i'm wrong but when you went to thw aspx page manually is showed the code correct!
-
ABCDrawHTML is mainly used with ASP .NET and VB, i haven't see it used via PHP.. either way you can try CLI or COM review these COM exec
-
You can but i think your find when you load up that page manually it will still show the source, do your server (with the ASPX file) support ASPx?
-
lol WooHoo can you please click solved (bottom left)
-
as a note try using the absolute path, relative has cause me problems on sime servers
-
try chmod
-
missing spaces "D:\\oeat\\mockup\\csdk\\CDemos\\LITConvertDemo\\Release\\LITConvertDemo.exe". " D:\\oeat\\mockup\\upload"."\\".$_SESSION['title']."\\".$_SESSION['title']."\\".$_SESSION['title'].".opf"." D:\\oeat\\mockup\upload"."\\".$_SESSION['title']."\\".$_SESSION['title']."\\".$_SESSION['title'].".lit"
-
Try this form.html Code: <HTML> <head> <title> Form </title> </head> <body> <form action="mail.php" method="POST"> <input name="name"> <br><input name="email"> <br><input name="phone"> <br><input type="submit" value="Send!"> </form> </body> </HTML> mail.php <?php $email = "your@email.adress"; $subject = "Contact Form"; $message = "Name: ".$_POST['name']; $message .= "\nEmail Adress: ".$_POST['email']; $message .= "\nTelephone: ".$_POST['phone']; $message = addslashes($message); mail($email, $subject, $message); echo("Thankyou for filling out the Form!"); ?> on a side note, in your code replace $_REQUEST[message] with {$_REQUEST['message']} and $_REQUEST with {$_REQUEST['email']}
-
WScript is commonly disabled as its a secuirty risk
-
I also do VB3-8, the fact is don't seam to understand the basics, each pages is like a class, if you know OOP then you can adapted however noobies are welcome, rudness isn't.. good luck Techie Out! PS that code had basic logic mistakes.. no matter what language you use!
-
[SOLVED] Using Select and Where and ordering results issues
MadTechie replied to Richzilla's topic in PHP Coding Help
try timestamp = now() -
can you post the code ? in code tags
-
Have a php page thats fetch's the data from a database and builds the page ie page.php?id=1 select * from tabel where ID = $_GET['ID']; etc if you need more detail i can post it.
-
debug tip print_r($_SESSION); die; add to the top of a page check the output them move to the bottom check output if the same move to next page etc etc etc may help!!
-
OMG.. ok well if you don't know the basics maybe the freelance section is a better place, or a book store.. we are NOT going to write your site for you!
-
Fast reply yes.. please click SOLVED