PHP - Help With Auto Creation After Payment
I am not sure what to look for to even get started. If some one could help point me in the right direction that would be appreciated.
I created a customer system that tracks contracts and invoices ect. Where do I start if I would want a customer to be able to go to the website, sign up, and their own version of the system would be created.
Do I just write a script that creates a new database with the correct credentials? Do all of the users access the same files but just have different database. Do I have to copy the directory of files to a specific folder for each customer?
I know there must be tons of websites that once you sign up for example a calendar app that keeps your data seperate from everyone else.
Any help is appreciated.
Thanks
Jack
Similar TutorialsHey guys I have a small issue, i have an upload that resizes the image into thumbnail by max width and ratios the width based on that. Here is my code
What I am wanting to do is instead upload the image with a max height and ratio the width proportionally. What variables do I have to reverse? With the following code i can create an xml file. Code: [Select] <?php $myXML = new SimpleXMLElement("<myroot></myroot>"); $title= $myXML->addChild('title'); $title->addAttribute('number','12'); $titleName= $title->addChild('titleName', 'title1'); $titleLink= $title->addChild('titleLink', 'link1'); Header('Content-type: text/xml'); echo $myXML->asXML(); ?> But when i check the validity of xml file http://www.validome.org/xml/validate/ This error occurs: Can not find declaration of element 'myroot'. I suppose that the problem is missing of !DOCTYPE and !ELEMENT lines. How can i create valid XML documents with PHP automatically?? Is it possible to make it without writing doctype and element types for the whole element types of xml by hand $title, $titleName and $titleLink Thank you I am attempting to create an image and I have run into a snag. I want to add both text and another image to the image I am making. Here is the code so far minus unnecessary parts: header ("Content-type: image/png"); $name = $fetch_user['username']; $rank = $fetch_rank['rank_title']; $img_url = 'path''. $fetch_rank['rank_image']; $im = @imagecreatefrompng("$img_url") or die("Cannot Initialize new GD image stream"); // try changing this as well $font = 4; $width = imagefontwidth($font) * strlen($string) ; $height = imagefontheight($font) ; $im = imagecreatefrompng("image.png"); $x = imagesx($im) - $width ; $y = imagesy($im) - $height; $backgroundColor = imagecolorallocate ($im, 255, 255, 255); $textColor = imagecolorallocate ($im, 255, 255, 255); //imagestring ($im, $font, $x, $y, $string, $textColor); imagestring ($im, $font, 100, 10, $name, $textColor); imagestring ($im, $font, 100, 22, $rank, $textColor); imagepng($im); Everything works UNTIL I added in this part: $im = @imagecreatefrompng("$img_url") or die("Cannot Initialize new GD image stream"); Any idea what I am doing wrong? All that comes up is "Cannot Initialize new GD image stream"; and I know the URL's work. i have mysql community server 5.5 workbench 5.2 php 5.3.8 apache http server 2.2 summary: can i write the same code using less variables for the file name and content? okay so i managed to write a code that creates a filename, and each new filename is 1 higher. colony1 colony2 colony3. it also uses the same mysql query created variable to write idcol as 1 higher in the new file than in the previous written file. however to write the code i had to use a buttload of variables. here is the code, the resultant filename and the resultant content of the created file. is there a way to write such a code with less than 15 variables? the problem seems to be that when writing text to a file, i cannot insert certain characters outside of a variable into the final variable which is put in the $string variable input into the fwrite() function. File Name: Colony$.php where $=the last entry in the idcol column in table coltest. File Code: Code: [Select] <?php $idcol = $; include('Colony0.php'); ?> </body> </html> where $=the last entry in the idcol column in table coltest. Code: Code: [Select] <?php $dbhost = 'localhost:3306'; $dbuser = 'root'; $dbpass = 'root'; $dbname = 'aosdb'; $conn = mysql_connect($dbhost,$dbuser,$dbpass) or die ('Error connecting to mysql'); mysql_select_db($dbname); $query = "SELECT idcol FROM coltest ORDER BY idcol DESC LIMIT 1"; $result = mysql_query($query); $id = mysql_result($result, 0); $vcol = "Colony"; $vcolp = ".php"; $File = "$vcol$id$vcolp"; $FileHandle = fopen($File, 'w') or die("can't open file"); fclose($FileHandle); $File = "$vcol$id$vcolp"; $myFile = $File; $fh = fopen($myFile, 'w') or die("can't open file"); $idw = "$"; $icol= "idcol"; $ique = "?"; $iphp = "Colony0.php"; $ief = "<"; $ieb = ">"; $irese = "= "; $iresn = ";"; $iii= "include('$iphp');"; $ihtml ="</body> </html>"; $hph = "php"; $string = "$ief$ique$hph $idw$icol $irese$id$iresn $iii $ique$ieb $ihtml"; fwrite($fh, $string); fclose($fh); ?> Whats is the best way to create a forum using php? Should I use any frameworks? If not is there any guide/tutorial/book that descibe this procedure? Thank you. So a project I have simply to learn how it is done is to make an auto updating sitemap with a auto submitter. I have been doing a little research on sitemaps but haven't found much in the way of a tutorial or white paper or similar, anyway I was wondering if I am on the right track or not. What I was thinking for the auto-updating sitemap is since site maps are XML, when an article is published using my custom CMS/Blogging system, I make it rewrite the sitemap appending the new URL that will be generated. Then for the auto-submit, I can either make it a cron job or just manual press, but it would go though a for list of URLs, replacing the end part with my site map url. I think that is how it would be done. If you have a better idea, or can point out an article so I can understand a lot more with sitemaps, I will appreciate it, I am trying to learn as much as possible, I have gone to the offical website (sitemaps.org) but it doesn't have what I am looking for. Thanks, James //php code <?php include_once('con.php'); if(!empty($_GET['search'])) { $search = $connect->prepare('SELECT * FROM posts WHERE title LIKE :search'); $search->bindValue(':search', '%'.$_GET['search'].'%', PDO::PARAM_STR); $search->execute(); ?> <?php while($row = $search->fetch()) {?> <li class="result" onClick="searchValue('<?php echo $row['title'];?>')"><?php echo $row['title'];?></li> <?php } ?> <?php } ?> //ajax $('#inputsch').keyup(function(){ $.ajax({ type: 'GET', url: 'fetch.php', data:'search='+$(this).val(), success: function(data){ $('#box').show(); $('#box').html(data); } }); }); }); function searchValue(val) { $('#inputsch').val(val); $('#box').hide(); } //search box <form action="search.php"> <input id="inputsch" type="text" name="search" placeholder="search..." autocomplete="off" autofocus> <button type="submit" value="search" >search</button> </form> <div id="box"></div> //the problem here is when i click the result is only added to input, but i want it to autosubmit
I am trying to create a basic image with GD library, but my browser says that the image cannot be displayed because it contains errors... I have no idea why. Here's my code: Code: [Select] switch($_GET['case']){ case "progressbar": header('Content-Type: image/jpeg'); $barWidth = 6; $barHeight = 14; $barPadding = 2; $imageWidth = ($barWidth * 10) + (10 * $barPadding); $imageHeight = ($barHeight + ($barPadding * 2)); $img = @imagecreate($imageWidth, $imageHeight); $imgBorder = imagecolorallocate($img, 0, 0, 0); //imagefilledrectangle($img, 1, $imageHeight -1, $imageWidth - 1, $imageHeight - 1, $imgBorder); $output = "Hello, world!"; imagestring($img, 1, 4, 4, $output, $imgBorder); imagejpeg($img); imagedestroy($img); break; } I have a file called image.php that i use to create images and I use the URL image.php?case=progressbar. Hi, I am wanting to check to see if a folder exists, if not create it. PHP on a windows machine so I would like to know how to handle the folder separators. I am wanting to use a path which includes the drive letter, such as... $foldername ="C:\folder1\images\$checkfolder" I was thinking about using something like this: if(!is_dir($foldername)) mkdir ("$foldername",777); What would be the best way of tackling this using windows paths? if the date of selling goods " $date = "2011/06/05"; and if we have payment after of $days = "15"; - (15 days), how to calculate when the last day for payment? I am building program to manage payment/monthly payments. I've ran into an issue that I haven't been able to overcome and need some help. I've been lurking for a while and decided it was time to ask you guys...Here's the issue: I have a table 'payments' that contains scheduled payments that looks like: id clientid paymentduedate balance expected pending 367 112233 4/16/2011 1030.00 257.50 Y 368 112233 5/16/2011 1030.00 257.50 Y 369 112233 6/16/2011 1030.00 257.50 Y 370 112233 7/16/2011 1030.00 257.50 Y What I need to do that I haven't figured out is to adjust the expected amount according to the payment, update the status to N (not pending) without affecting the later expected payments. For example: they make a payment of $257.50, applies that to row 367, sets the status to N, but leaves the other status' to Y (for obvious reasons). the make a payment of $250.00, leaving the balance at $7.50, so lets add $7.50 to row 368, mark 367 status to N the make a payment of $300.00, leaving the expected balance at $0.00 for row 367, but adjust the balance for row 368 to $215.00 Any ideas? Thanks Hi guys, i'm in a dead end with this. I'm more a design guy and i'm trying to implement these 2 payment gateways on a website i'm launching soon but don't know how to do it. I have the php sample files from bitpay and the other payment gateway (offline atm payments). I can implement a button for the payment but the php needed to receive payment notification, ipn or callback, and update user balance in the database it's way out of my knowlegde. Can someone give me a hand in implementing this? I have paypal runing but i'd like to have these other two options. Thanks in advance, Tiago Vasconcelos Code: [Select] ${$payment['amount']} using the $ next to it doesn't work I am using itinside double quotes, any way I can get that dollar sign right next to it? This for people buying stuff off my forum i want the amount to show right by the $ dollar sign And im working inside double quotes only Hi, I've integrated paypal payment pro over my website. I don't know how can i test it. can any one help me out? my site address is : http://pacific-labs.com/paymybill.php Please help Hey, Within my experience of PHP, I have never had anything to do with making secure payments before. And this is a problem I can't seem to get around. I want to let people purchase a premium version of a game, and it will add their name to a PHP file or databse after they are redirected from PayPal to a special page that adds their username to the PHP file after typing it in. How would one make sure they don't just go to the webpage VIA the URL, and that they only came from the PHP redirect after purchase? I've been stuck on this for about a week so I was wondering if I can get some help from you guys! Basically I'm exporting an array of values to a CSV file, within that array are two other arrays containing data I need. What I need to work out is how I can create a CSV with headers for these values, then with the nested arrays also print their values into the same rows as the first array. Example: $List = array ( 'Product ID' => '10', 'Customer Address' => '123 Fake Street', array( array('Product Name'=>'Product1', 'Product Price'=>'10.00', 'Product Reference'=>'HGJEN'), array('Product Name'=>'Product2', 'Product Price'=>'5.00', 'Product Reference'=>'HGJTN'), array('Product Name'=>'Product3', 'Product Price'=>'10.00', 'Product Reference'=>'HGJNN'), ), array( array('Product Customisation Name'=>'Additional Info', 'Customisation Value'=>'Things are great.'), array('Product Customisation Name'=>'Image Upload', 'Customisation Value'=>'Logo.jpg'), ), 'Telephone Number'=>'999', ); To be exported to something looking like this: Product ID Customer Address Product Name Product Price Product Reference Product Cus Name Cus Value Telephone Number 10 123 Fake Street Product2 5.00 HGJTN Additional Info Things are great 999 10 123 Fake Street Product1 10.00 HGJEN Image Upload Logo.jpg 999 10 123 Fake Street Product3 10.00 HGJNN 999 If anyone could help me out in anyway I would be so appreciative, I'm sure this ones going to end up killing me! Hi all, Weird one: I am re-working a site for a client. Their old site currently grabs text from a DB and somehow automatically puts it into a <ul>. The only thing to signify a <li> is a linebreak. So if I entered: Item 1 Item 2 Item 3 into the database, they would come out looking like: Item1 Item 2 Item 3 on the site. Anyone know of a way to recreate this? An example of this in action is he http://www.postureperfection.com.au/Chairs/Amore_Chair/p/495/ (please remember - I am redesigning the site!) Thanks heaps! This topic has been moved to mod_rewrite. http://www.phpfreaks.com/forums/index.php?topic=321416.0 Hi So I have successfully set up a website and database where a user can create a listing and view listings on a listing details page. The viewing can only be done, however, only from either from either running a search query from the search form or from clicking one of the listings from the listing table. The listings are not being indexed from the search engines from the direct page, instead from the listing table which is about 3,000 listings, not very user friendly to land on this page and have to go through the table or use the table filter. Here's what I am trying to accomplish: A web page that has a dynamic presence / URL like a Wordpress page: http://www.mysite.com/listing_title/ The title of the page has the listing information in it: This page is about a $listing_title $listing_item listing number $listing_number that is online! Each individual Listing / page is indexed on the search engines and has a direct link to it I am familiar with PHP and have created this site but I am far from an expert! Please give me a code example or link to one because if you just say "do this to this and that" you will totally loose me. Thank you so much for any help. Day
I'm using Codeigniter and inside the framework I create a file with PHP code If I try to point to it, the web-server doesn't deliver due to permission issues.
All this is done in a 'register function' where I create some fields in a SQL
If I put the user credentials into the database 'by hand' and likewise when I
I'm pretty sure this issue has been existed before and I'd appreciate any help.
Thanks for your help in forward. Gee Edited August 17, 2020 by bogus |