PHP - Novice - Lottery Ticket Generator
Struggling with creating the following:
Similar Tutorialsis there any available for me to enhanced on /etc? How would I go about starting 1 i want 1 with 32 numbers and i need to have to run a query every 1hour how would i go about this? ok i have a lottery system very nice one choose 36 balls/etc 3 numbers must be exaxt, odds of winning is like 1:45920 lol prob is for the lottery to countdown and select the lottery, somone needs to be at the site to refresh the "DELETE FROM" query/etc/etc how would I go about making it so after the time is run down, what if no1 is viewing the lottery page? then the new lottery wont run, i need something refresh that page every other 1hour, cron job? I am trying to use a Wordpress module called WooCommerce PDF Invoices to make event tickets by modifying the layout of the invoice to create an online ticket to printout. I've successful reformatted the layout and it works like a charm except for one thing. The problem I have is that no matter what is bought the invoice reads "This is a ticket" which I hardcoded into the invoice design. What I would like is an if/then statement inserted into the invoice design that will print between "This is a ticket" or "This is a receipt" depending on if they purchase one of the 4 ticket items. "This is a recept" If ticket 1 then print "This is a ticket" else print "This is a receipt. If ticket 2 then print "This is a ticket" else print "This is a receipt. If ticket 3 then print "This is a ticket" else print "This is a receipt. If ticket 4 then print "This is a ticket" all else print "This is a receipt." I completely redesigned the woocommerce pdf invoice to look like an online ticket. The first half looks like an actual ticket. <?php global $wpo_wcpdf; ?> <table align="center" cellpadding="0" cellspacing="0" class="pdfbackground" style="width: 700px; height: 350px"> <tr> <td style="width: 20px"> </td> <td style="width: 285px"> </td> <td style="width: 300px"> </td> <td style="width: 75px"> </td> <td style="width: 20px"> </td> </tr> <tr> <td rowspan="4" style="width: 20px"> </td> <td class="pdflogo" rowspan="4" style="width: 285px"><br /><div id="container"><div><?php if( $wpo_wcpdf->get_header_logo_id() ) { $wpo_wcpdf->header_logo(); } else { _e( 'Ticket', 'wpo_wcpdf' ); } ?></div><div class="order-information"> <br /><br /><hr width=50% color=#0087E1><?php $date_setting = isset($wpo_wcpdf->settings->template_settings['display_date'])?$wpo_wcpdf->settings->template_settings['display_date']:'order_date'; $number_setting = isset($wpo_wcpdf->settings->template_settings['display_number'])?$wpo_wcpdf->settings->template_settings['display_number']:'order_number'; // set $display date & label to user setting if ( $date_setting == 'invoice_date' ) { $display_date = $wpo_wcpdf->get_invoice_date(); $display_date_label = __( 'Event Date:', 'wpo_wcpdf' ); } else { $display_date = $wpo_wcpdf->get_order_date(); $display_date_label = __( 'Order Date:', 'wpo_wcpdf' ); } // set $display number & label to user setting if ( $number_setting == 'invoice_number' ) { $display_number = $wpo_wcpdf->get_invoice_number(); $display_number_label = __( 'Transaction Number:', 'wpo_wcpdf' ); } else { $display_number = $wpo_wcpdf->get_order_number(); $display_number_label = __( 'Order Number:', 'wpo_wcpdf' ); } ?> <span class="order-date-label"><?php echo $display_date_label; ?></span> <span class="order-date"><?php echo $display_date; ?></span><br /> <span class="order-number-label"><?php echo $display_number_label; ?></span> <span class="order-number"><?php echo $display_number; ?></span><br /> <br /> <br /> </div></div></td> <td style="width: 300px"><div class="shop-name"><h3><?php $wpo_wcpdf->shop_name(); ?></h3><br /> SPONSORED BY: <br />SPONSOR 1 LOGO | SPONSOR 2 LOGO </div> </td> <td rowspan="4" style="width: 75"><br /><br /><br /><br /><br /><br /> <img alt="" height="126" src="http://www.3corlando.com/wp-content/uploads/2014/06/barcode.png" width="71" class="barcode" /></td> <td rowspan="4" style="width: 20px"> </td> </tr> <tr> <td style="width: 300px"><hr width=75% color=#0087E1><div class="shop-address"><?php $wpo_wcpdf->shop_address(); ?></div> </td> </tr> <tr> <td style="width: 300px"> </td> </tr> <tr> <td style="width: 300px"></td> </tr> <tr> <td class="pdfborder" style="width: 20px"> </td> <td class="pdfticket" colspan="3"><div class="pdfticket"><hr width=50% color=#0087E1>***This is a Receipt*** </div> </td> <td class="pdfborder" style="width: 20px"> </td> </tr> </table>And the second half looks like an invoice. <!-- head container --> <hr> <table class="order-details"> <thead> <tr> <th class="product-label"><?php _e('Shop Items', 'wpo_wcpdf'); ?></th> <th class="quantity-label"><?php _e('Quantity', 'wpo_wcpdf'); ?></th> <th class="price-label"><?php _e('Price', 'wpo_wcpdf'); ?></th> </tr> </thead> <tbody> <?php $items = $wpo_wcpdf->get_order_items(); if( sizeof( $items ) > 0 ) : foreach( $items as $item ) : ?><tr> <td class="description"> <?php $description_label = __( 'Description', 'wpo_wcpdf' ); // registering alternate label translation ?> <span class="item-name"><?php echo $item['name']; ?></span><span class="item-meta"><?php echo $item['meta']; ?></span> <dl class="meta"> <?php if( !empty( $item['sku'] ) ) : ?><dt><?php _e( 'SKU:', 'wpo_wcpdf' ); ?></dt><dd><?php echo $item['sku']; ?></dd><?php endif; ?> <?php if( !empty( $item['weight'] ) ) : ?><dt><?php _e( 'Weight:', 'wpo_wcpdf' ); ?></dt><dd><?php echo $item['weight']; ?><?php echo get_option('woocommerce_weight_unit'); ?></dd><?php endif; ?> </dl> </td> <td class="quantity"><?php echo $item['quantity']; ?></td> <td class="price"><?php echo $item['order_price']; ?></td> </tr><?php endforeach; endif; ?> </tbody> <tfoot> <tr class="no-borders"> <td class="no-borders" colspan="3"> <table class="totals"> <tfoot> <?php foreach( $wpo_wcpdf->get_woocommerce_totals() as $total ) : ?> <tr> <td class="no-borders"> </td> <th class="description"><?php echo $total['label']; ?></th> <td class="price"><span class="totals-price"><?php echo $total['value']; ?></span></td> </tr> <?php endforeach; ?> </tfoot> </table> </td> </tr> </tfoot> </table><!-- order-details --> <table class="notes container"> <tr> <td colspan="3"> <div class="notes-shipping"> <?php if ( $wpo_wcpdf->get_shipping_notes() ) : ?> <h3><?php _e( 'Customer Notes', 'wpo_wcpdf' ); ?></h3> <?php $wpo_wcpdf->shipping_notes(); ?> <?php endif; ?> </div> </td> </tr> </table><!-- notes container --> <?php if ( $wpo_wcpdf->get_footer() ): ?> <div id="footer"> <?php $wpo_wcpdf->footer(); ?> </div><!-- #letter-footer --> <?php endif; ?>I want to identify one of my 4 ticket items that may appear where the invoice prints the items and when one of them does appear it changes "This is a receipt" to "This is a ticket" in the first half. Is something like this possible? If so, can anyone give me a direction to find the coding for this? Can anybody give me an idea how to write this in php. I'm a pro at html but I've only taught myself how to modify existing php coding. I can't write it from scratch. Any help is appreciated. This topic has been moved to PHP Applications. http://www.phpfreaks.com/forums/index.php?topic=348601.0 I am creating a program to simulate the Powerball Lottery game, I have everything working but i forgot to add the Quick Pick Option, having alittle bit of an issue with my "if" statement I believe. My confusion is whether it should be a nested "if", or should it be it's own entity? Here's what i have so far: Code: [Select] <?php $intGrandPize = 10000000; $intRegCount = 5; $intMaxReg = 59; $intMaxPB = 39; //$quick = rand(1, 59); //$quickPB = rand(1, 49); if (isset($_POST['Quick Pick'])){ if (count($_POST)>0) { $aryPick = array(); $intPower = 0; for($t=1;$t<=$intRegCount;$t++) { if (isset($_POST['num'.$t])) { $intPick = (int)$_POST['num'.$t]; if ($intPick > 0 && $intPick <= $intMaxReg && !in_array($intPick,$aryPick)) { $aryPick[] = $intPick; } } } if (isset($_POST['Power']) && (int)$_POST['Power'] > 0 && $_POST['Power'] <= $intMaxPB) { $intPower = (int)$_POST['Power']; } if (count($aryPick) < 5 || $intPower == 0) { echo "<font color='red'>'*Five unique numbers and a PowerBall selection are Required*'</font>";; } else { // Have valid numbers... sort($aryPick); // For if you are going to display them, they will be in order... // Pick your winners $aryAllBalls = range(1,$intMaxReg); // array of numbers 1 - 59 shuffle($aryAllBalls); // Randomize their order $aryAllBalls = array_chunk($aryAllBalls,$intRegCount); // The above breaks up into an array with 5 numbers each // [0] contains the first 5 balls of all balls randomized, these are what are "picked" $aryPickedBalls = $aryAllBalls[0]; sort($aryPickedBalls); // Sort them for display $intPowerBall = rand(1,$intMaxPB); echo "YOUR WINNING NUMBERS A <br>",implode(' ',$aryPickedBalls),' PB: ',$intPowerBall,"<br>\n<br>\n"; echo "You Picked: "; foreach($aryPick as $key=>$val) { if (in_array($val,$aryPickedBalls)) { echo '<strong>',$val,'</strong> '; } else { echo $val,' '; unset($aryPick[$key]); // Remove it since it didn't match } } $bMatchPB = ($intPower == $intPowerBall); // Set here since checked in 3 places... if ($bMatchPB) { echo 'PB: <strong>',$intPower,"</strong><br>\n<br>\n"; } else { echo 'PB: '.$intPower,"<br>\n<br>\n"; } // At this point, $aryPick will only contain matching numbers... $intMatches = count($aryPick); echo 'You matched '.$intMatches,' numbers and did '; if (!$bMatchPB) { echo 'not '; } echo "match the PowerBall number.<br><br>\n\n"; // HERE YOU WOULD DO SOMETHING TO SAY HOW MUCH THEY WON if ($intMatches>=3 || $bMatchPB) { $intWinnings = 0; switch ($intMatches) { case 0: if ($bMatchPB) { $intWinnings = 3; } break; case 1: if ($bMatchPB) { $intWinnings = 4; } break; case 2: if ($bMatchPB) { $intWinnings = 7; } break; case 3: if ($bMatchPB) { $intWinnings = 100; } else { $intWinnings = 7; } break; case 4: if ($bMatchPB) { $intWinnings = 10000; } else { $intWinnings = 100; } break; case 5: if ($bMatchPB) { $intWinnings = $intGrandPize; } else { $intWinnings = 200000; } break; default: echo "ERROR: Winning Combination not defined in systen!!!<br>\n"; } echo "<strong>YOU ARE A WINNER!!!!</strong><br>\n"; echo 'You Won: $'.number_format($intWinnings,0),"<br>\n"; } else { echo "Sorry, you didn't win. Try again!<br>\n"; } } // END: if (had valid numbers picked) } // END: There was data posted (ie. Form submitted) ?> Hi, I have lottery blog and i want to automate lottery results to post on my website instead of manually enter into website. Is there anyway to do it. I am not technical expert. Please guide me step by step so i can do it easily. Own website: https://uk49sresult.co.uk/ Scraping website: https://49s.co.uk//49s/ Edited May 26 by Johnwilliam Hi everyone, I hope you can help me. I am working on a Website at present whereby I am advertising the number of available tickets left for an event. However, I now want to remove this feature from the site, but because I myself did not code the site initially, I'm not sure what part of the code needs to be removed. I have included a copy of the code below: Code: [Select] $venues = $conn->dbAll($query); $conn->dbClose(); if (count($venues) == 0) { echo "<div class='error'>There are no more tickets available to buy</div>"; } else { echo " <form method='post' action='summary.php'>"; $venuecount = 0; foreach ($venues as $v) { echo "<div class='venue'> <div class='match_date'><b>Match Date:</b> " . date(ymd, $v['m_date']) . "</div> <h2>" . escape($v['venue_name']) . "</h2> <div class='venue_address'>" . nl2br(escape($v['venue_address'])) . "</div> [color=red][b]<div class='tickets_container'> <div class='tickets'>" . ($v['tickets_left'] < 30 ? "<span class='tickets_low'>" . escape($v['tickets_left']) . "</span>" : "" . escape($v['tickets_left']) . "") . " tickets left to buy for this match</div>";[/b][/color] if ($v['tickets_left'] > 0) { echo " <div class='tickets_buy'> <input type='hidden' name='venue[]' value='" . escape($v['id']) . "' /> Select how many tickets you wish to buy <select name='quantity[]' id='venue_" . escape($venuecount) . "' onchange='update_tickets()' onkeyup='update_tickets()'> <option value='0'>No tickets</option> <option value='1'" . (isset($_SESSION['tickets'][$v['id']]) && $_SESSION['tickets'][$v['id']] == '1' ? " selected='selected'" : "") . ">1 ticket</option> " . ($v['tickets_left'] > 5 ? " <option value='2'" . (isset($_SESSION['tickets'][$v['id']]) && $_SESSION['tickets'][$v['id']] == '2' ? " selected='selected'" : "") . ">2 tickets</option> <option value='3'" . (isset($_SESSION['tickets'][$v['id']]) && $_SESSION['tickets'][$v['id']] == '3' ? " selected='selected'" : "") . ">3 tickets</option> <option value='4'" . (isset($_SESSION['tickets'][$v['id']]) && $_SESSION['tickets'][$v['id']] == '4' ? " selected='selected'" : "") . ">4 tickets</option> <option value='5'" . (isset($_SESSION['tickets'][$v['id']]) && $_SESSION['tickets'][$v['id']] == '5' ? " selected='selected'" : "") . ">5 tickets</option>" : "") . " </select> <a href='#buy'>Confirm Ticket</a> </div> I have highlighted the code I understand needs to be changed, but I'm not overly familiar with this type of coding and do not want to screw up how the rest of the site works! I would really appreciate somebodys help on this! Many thanks in advance, BB2011 Hello, I have written a PHP upload script.. all is well, so far... apart from the moving of the file at the very end of the script. Here's my script.. <? /* This script handles the uploading of a users photos to the display screen slideshows. 1. Collects data from uploaded image 2. Checks to see if database table exists for the screen in question. 2. Inserts record into database should a table exist. Otherwise, kill script. 3. Takes ID of inserted record from the database 4. Renames photo to the ID of the inserted record 5. Moves photo to the directory holding the images for the screen 6. Modifies entry inserted above to include new image location */ //Config include_once "../../includes/config/config.php"; //Retrieve the screen the user is uploading to $area = $_POST["area"]; //Check to see if screen exists $query = "SELECT * FROM screen_areas WHERE area='$area'"; $query = mysql_query($query); $num_rows = mysql_num_rows($query); if($num_rows=="0") { die("Photo upload could not be completed. Screen not found in database. (Error 3)"); } //Image Information $title = $_POST["title"]; $description = $_POST["description"]; //Simplify Image Data Array $image = $_FILES["image"]; $name = $image["name"]; //Photo Name $temp = $image["tmp_name"]; $extension = end(explode('.', $name)); //New Photo Location $new_location_directory = "/screens/images/$area"; $new_location = "$new_location_directory/$name"; //Check if new location (directory) exists $is_dir = is_dir($new_location_directory); if($is_dir=="FALSE") { die("Photo upload could not be completed. Screen directory could not be located. (Error 4)"); } //Insert record into database for this image $query = "INSERT INTO screen_data (area, title, description, location) VALUES ('$area', '$title', '$description', '$new_location')"; $query = mysql_query($query) or die(mysql_error()); //Get ID of inserted record $query = "SELECT * FROM screen_data WHERE title='$title' AND description='$description' AND location='$new_location'"; $query = mysql_query($query); while($row=mysql_fetch_array($query)) { $id = $row["id"]; } //Rename File $name_rename = "$id"; $name_rename .= "."; $name_rename .= "$extension"; //New Location after Renaming $new_location = "$new_location_directory/$name_rename"; //Move Photo if(move_uploaded_file("$temp", "$new_location")) { echo "The file ". basename($name). " has been uploaded"; } And here is the error returned to me: Quote Warning: move_uploaded_file(/screens/images/conference centre/23.png) [function.move-uploaded-file]: failed to open stream: No such file or directory in /Users/George/Desktop/Torindul/Customer Accounts/1035 The Gryphon School/Display CMS/Website/includes/functions/upload.php on line 69 Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/Applications/MAMP/tmp/php/phpK8VJYe' to '/screens/images/conference centre/23.png' in /Users/George/Desktop/Torindul/Customer Accounts/1035 The Gryphon School/Display CMS/Website/includes/functions/upload.php on line 69 Any ideas as to why this may be occurring? Thanks in Advance, George. P.S I have CHMOD'd all directories to 755 where required. I am a web designer/PHP hack trying to solve a problem for our HR department. We have a quarterly newsletter in a Wordpress site I developed and they want to have a dynamically updated service anniversary page updated through excel. The solution to this problem is clearly fgetcsv, but I'm having trouble understanding how to implement it within the wordpress page. Here is a really nice function from the php manual page Code: [Select] <?php function csv_file_to_mysql_table($source_file, $target_table, $max_line_length=10000) { if (($handle = fopen("$source_file", "r")) !== FALSE) { $columns = fgetcsv($handle, $max_line_length, ","); foreach ($columns as &$column) { $column = str_replace(".","",$column); } $insert_query_prefix = "INSERT INTO $target_table (".join(",",$columns).")\nVALUES"; while (($data = fgetcsv($handle, $max_line_length, ",")) !== FALSE) { while (count($data)<count($columns)) array_push($data, NULL); $query = "$insert_query_prefix (".join(",",quote_all_array($data)).");"; mysql_query($query); } fclose($handle); } } function quote_all_array($values) { foreach ($values as $key=>$value) if (is_array($value)) $values[$key] = quote_all_array($value); else $values[$key] = quote_all($value); return $values; } function quote_all($value) { if (is_null($value)) return "NULL"; $value = "'" . mysql_real_escape_string($value) . "'"; return $value; } ?> But this leaves me with a few questions: 1. is this both function AND query? or do i need extra code to run the function and spit out the results? 2. where do i input my actual values? 3. does this have to mirror a mysql table somewhere else? i feel like i'm missing a crucial piece of info here. the path to the csv file needs to be absolute, due to HR needing to manage the file themselves without the help of yours truly. the intended output will look like this: 5 YEARS FirstName1 LastName1, FirstName2 LastName2, FirstName3 LastName3, etc 6 YEARS FirstName1 LastName1, FirstName2 LastName2, FirstName3 LastName3, etc and so on. so in addition to the FirstName, LastName and Year columns, the loop will need to include a conditional statement. something like: Code: [Select] <h1>5 YEAR</h1> <ul> <?php if (quote_all_array(5) ) : ?> echo "<li>(FirstName, LastName), </li>"; <?php endif; ?> </ul> <h1>6 YEAR</h1> <ul> <?php if (quote_all_array(6) ) : ?> echo "<li>(FirstName, LastName), </li>"; <?php endif; ?> </ul> I'm sure my syntax is horribly wrong because I have virtually no idea what I'm doing. Which is why I'm asking you all for help to help my understanding i'll supply a set of variables: CSV Source: http://resource.mysite.com/anny.csv Table Columns: FirstName, LastName, Year External MySql database (should it apply): AnnySql Thanks in advance for any help. I'm over my pay grade on this one. Hi, I'm Drew.
I'm a web developer, primarily on the WordPress platform.
I'm not a proficient PHP programmer but I can and have edited lots of PHP code to improve my sites. So, in a way, I'm learning PHP...the hard way.
As probably is the case with most users, I'm here becuase I'd like help with some code and because I want to fasttrack my PHP education.
I'll get to that eventually, this is just me introducing myself to the community.
Best regards.
My prof hasn't gotten back to me and he doesn't seem like even he knows how to do it so I'm posting here for some help. We've barely done any script writing yet and I can't seem to figure out how to go about doing it. He wants us to modify the existing script so that it generates a random number from 1 - 1000 and then counts the number of guesses and outputs how many guesses at the end. It won't open in the browser so I'm not sure what's wrong. Any help would be much appreciated!
This is what I have so far:
<?php if (!isset($_POST["guess"])) { $message = "Welcome to the guessing machine!"; $_POST["numtobeguessed"] = rand(1,1000); $_POST["counter"] = 0; } else if ($_POST["guess"] > $_POST["numtobeguessed"]) { $message = $_POST["guess"]." is too big! Try a smaller number."; $_POST["counter"]++; } else if ($_POST["guess"] < $_POST["numtobeguessed"]) { $message = $_POST["guess"]." is too small! Try a larger number."; $_POST["counter"]++; } else { // must be equivalent $message = "Well done! It took you '$_POST["counter"]' tries!"; } ?> <html> <head> <title>A PHP number guessing script</title> </head> <body> <h1><?php echo $message; ?></h1> <form action="" method="POST"> <p><strong>Type your guess he </strong> <input type="text" name="guess"></p> <input type="hidden" name="numtobeguessed" value="<?php echo $_POST["numtobeguessed"]; ?>" ></p> <input type="hidden" name="counter" value="<?php echo $_POST["counter"]; ?>" <p><input type="submit" value="submit your guess"/></p> </form> </body> </html> I'm using this code to get me the variables to a select box on a register page: $vars['user-birthdate-years'] = array(_VARS_USER_CHOOSE_ => "Please choose", _VARS_USER_NONE_ => _VARS_USER_UNDEF_); for ($i = date('Y') - 18; $i > date('Y') - 75; --$i) { $vars['user-birthdate-years'][$i] = "$i"; } This gives me this result in the page source: <select name="birthyear" class="date"><option value="-2" selected="selected">Please choose</option><option value="1997">1997</option><option value="1996">1996</option><option value="1995">1995</option><option value="1994">1994</option><option value="1993">1993</option><option value="1992">1992</option><option value="1991">1991</option><option value="1990">1990</option><option value="1989">1989</option><option value="1988">1988</option><option value="1987">1987</option><option value="1986">1986</option><option value="1985">1985</option><option value="1982">1982</option><option value="1981">1981</option><option value="1980">1980</option><option value="1979">1979</option><option value="1978">1978</option><option value="1977">1977</option><option value="1976">1976</option><option value="1975">1975</option><option value="1974">1974</option><option value="1973">1973</option><option value="1972">1972</option><option value="1971">1971</option><option value="1970">1970</option><option value="1969">1969</option><option value="1968">1968</option><option value="1967">1967</option><option value="1966">1966</option><option value="1965">1965</option><option value="1964">1964</option><option value="1963">1963</option><option value="1962">1962</option><option value="1961">1961</option><option value="1960">1960</option><option value="1959">1959</option><option value="1958">1958</option><option value="1957">1957</option><option value="1956">1956</option><option value="1955">1955</option><option value="1954">1954</option><option value="1953">1953</option><option value="1952">1952</option><option value="1951">1951</option><option value="1950">1950</option><option value="1949">1949</option><option value="1948">1948</option><option value="1947">1947</option><option value="1946">1946</option><option value="1945">1945</option><option value="1944">1944</option><option value="1943">1943</option><option value="1942">1942</option><option value="1941">1941</option></select> Problem: When running the php code at the top it miss two years in the span as you see in the page source below, the year 1983 and 1984 is completely missing in the page source. Why is this happening, could the php code be corrected or is there a workaround in php for the missing years bug I seem to have found? I really appreciate any help on this! Edited by Drezzzer, 12 January 2015 - 05:16 AM. I'm trying to read in a file which is essentially a csv. (I have a couple of books and am a n00b faffing with sessions/cookies etc and am trying to set up an app for a local forum I'm involved with...) I originally tried fgetcsv and also reading the file in line by line (via fgets/explode) and for the most part it works. However some of the entries have a '<' character within them and whenever the script hits a line with one of these it screws up and truncates the line. I presume the '<' is attempting to redirect the data somewhere(?), but have found no way of being able to read this in whole as of yet and I dont really want to resort to processing each line character by character... An example line would be: 3p!<ph4il,Fabulous Diamond Eyes,Lizzies,Div 3C I welcome some advice to put me out of my misery on the matter Hi,
I am new to this forum and I came here because I am a website owner that is a novice in php coding and I want to adjust the coding my web designer created, because I want to update my auto email when members sign up to my site. I found my signup.php page and found the secton where the contents of the auto email are housed but I have no way (or atleast I don't know the way) to test my coding adjustments without going through the signup process on my site and I don't want to do that multiple times just to check code, so I decided to see if I could ask the questions here and maybe someone can "eyeball" my coding adjustments and ensure that they work OR maybe you can instruct me how I can test my code. Keep in mind, this is not an actual page on my site, it's the auto email when users signup. It's sent from my signup.php page once the signup button is "clicked".
1. I'll provide a snippet of the code my webdesigner setup and that should work fine
2. I'll provide my changes to the email contents (basically text, image and html links).
Hopefully there is someone who can assist. Thanks A BILLION!!!
-Ivan
Below is the original code from my webmaster, shouldn't be anything wrong with this code. (You'll notice the links aren't html text links, I wanted to change that)
$headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $headers .= "From: mixrevu.com <noreply@mixrevu.com> \r\n"; $headers .= "Reply-To: noreply@mixrevu.com \r\n"; $headers .= "X-Mailer: PHP/" . phpversion(); $to = $_POST["email"]; $subject = "Website Sign Up \r\n"; $body = "<p><img src='http://www.mixrevu.com/img/logo.png'></p> \r\n"; $body .= "<p style='font-weight:bold;'>Welcome! We absolutely love new members!</p> \r\n"; $body .= "<p>Your signup is now complete.</p> \r\n"; $body .= "<p>Your Login details a <br> \r\n"; $body .= "Current Email: ".$_POST["email"]."<br> \r\n"; $body .= "Password: ".$_POST["pwd"]."</p> \r\n"; $body .= "<p style='font-weight:bold;'>Hang on to this email just in case you forget those details. </p> \r\n"; $body .= "<p>If you need any assistance, don’t worry we are here to HELP! - support@mixrevu.com</p> \r\n"; $body .= "<p style='font-weight:bold;'>Start Here</p> \r\n"; $body .= "<p>#1 Complete your profile so we know more about why you love pro audio mixing.<br> \r\n"; $body .= "#2 Join the conversation in our forum, we’d love to hear from you. - http://forum.mixrevu.com<br> \r\n"; $body .= "#3 Submit your mix in the mix-revu to get feedback you can’t get anywhere else on the internet and maybe even win a winner’s spot on our homepage! - http://www.mixrevu.com<br> \r\n"; $body .= "#4 Our merch store is the place to show others you are a proud member of the mixrevu community, check it out! - http://merch.mixrevu.com<br> \r\n"; $body .= "#5 We need photos of our members in their mix environment, post some!</p> \r\n"; $body .= "<p>-mixrevu team! </p> \r\n"; mail($to, $subject, $body, $headers);Below are my adjustments to the body of the email (it includes image links for social media, and html text links replacing the basic website address links) ** All of the changes I made are within the $body of the email. $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $headers .= "From: mixrevu.com <noreply@mixrevu.com> \r\n"; $headers .= "Reply-To: noreply@mixrevu.com \r\n"; $headers .= "X-Mailer: PHP/" . phpversion(); $to = $_POST["email"]; $subject = "Website Sign Up \r\n"; $body = "<p><img src='http://www.mixrevu.com/img/logo.png'></p> \r\n"; $body .= "<p style='font-weight:bold;'>Welcome! We Absolutely Love New Members!</p> \r\n"; $body .= "<p style='font-weight:bold;'>Follow Us For Mixrevu.com Updates: <a href='https://www.facebook.com/mixrevu'> <img border='0' alt='Facebook page' src='http://www.mixrevu.com/images/Facebook-logo-300x300.jpg' width='45' height='45'> </a> <a href='https://www.twitter.com/MIXREVU'> <img border='0' alt='Twitter page' src='http://www.mixrevu.com/images/Twitter_logo_blue.png' width='45' height='35'> </a> <a href='https://plus.google.com/+Mixrevu'> <img border='0' alt='Google plus' src='http://www.mixrevu.com/images/google_plus_03.png' width='60' height='45'> </a></p> \r\n"; $body .= "<p>Your signup is now complete.</p> \r\n"; $body .= "<p>Your Login details a <br> \r\n"; $body .= "Current Email: ".$_POST["email"]."<br> \r\n"; $body .= "Password: ".$_POST["pwd"]."</p> \r\n"; $body .= "<p style='font-weight:bold;'>Hang on to this email just in case you forget those details. </p> \r\n"; $body .= "<p>If you need any assistance, don’t worry we are here to HELP! - support@mixrevu.com</p> \r\n"; $body .= "<p style='font-weight:bold;'>Start Here</p> \r\n"; $body .= "<p>#1 Complete your profile by registering in the <a href='http://goo.gl/d2gBZX'>Forum</a>. This is where you’ll have access to our downloads when we upload them. Only members who’ve logged in to both will have access. You can also find previous Head2Head downloads <a href='http://goo.gl/L8gwXP'>HERE</a> that you can use for practice.<br> \r\n"; $body .= "#2 Be sure to check out the Mixrevu <a href='http://goo.gl/AUvo87'>Head2Head Rules</a>.<br> \r\n"; $body .= "#3 Mixrevu Head2Head Free Downloads are announced via Newsletters to all members first. You’ll automatically receive those as a site member. **If you have music of your own you want in a Head2Head, upload that too!!! We have genre specific spaces available.** <a href='http://goo.gl/FqzG6o'>Here’s how to upload</a>.<br> \r\n"; $body .= "#4 Our Sites Best <a href='http://goo.gl/5L8lzM'>Trivia</a>, <a href='http://goo.gl/yShmdh'>Quizzes</a> & <a href='http://goo.gl/smfV8z'>Audio Articles</a> are in our <a href='http://goo.gl/4Nmfqn'>Audio Blog</a>. - Exclusive content guaranteed to improve your mix process.<br> \r\n"; $body .= "#5 Upload your photo to our <a href='http://goo.gl/DOMMbP'>photo wall</a>, If you win a Head2Head this will be your featured photo!<br> \r\n"; $body .= "#6 Ever wanted to understand your studio better? We cover everything from EQ, Compression, Monitors, TDR, to Studio Acoustics & More in the <a href='http://goo.gl/KjCYxn'>Signal Path Series</a> .<br> \r\n"; $body .= "#7 <a href='http://goo.gl/kxQOik'>Exclusive Audio Engineer T-Shirts</a> & <a href='http://goo.gl/6KC31j'>Exclusive Downloads</a> you won’t find anywhere else are in our shop! Everything is ON SALE & Free Shipping in the U.S.!</p><br> \r\n"; $body .= "<p>-mixrevu team! </p> \r\n"; mail($to, $subject, $body, $headers); I need help with creating a page like this:
http://www.flashvort...p?exampleId=219
So that we can offer our clients the opportunity to edit their flash banners.
http://www.degngrafi.../web/Flash.aspx
The generator should be located on our webpage.
Purchase option is not needed as our clients will have this tool offered for free.
Hello everyone! I'm Abraham and I'm new here. I'm looking for a little help on making a password generator that can make passwords like this s7D9f3 - y2W4j6 - x1N5q8. I made one before but I lost the script can't seem to find it or remember how I did. I am having some issues with getting dates for the days of the week based on one date givin Example: User enters date for sunday. (Ending pay period) and I wish to get the dates for that week. Mon - 1-2-2012 Tue - 1-3-2012 Wed - 1-4-2012 Thu - 1-5-2012 Fri - 1-6-2012 Sat - 1-7-2012 Sun - 1-8-2012 User would enter 1/8/2012 and the script would get the rest of the dates to enter into the timecard. I have tried both ways below and cant get it to work no mater if i change the user input date i still get the same output. Function getdatepast($dtp,$cnt) { $undatecon = mktime($dtp); $undatecon2 = strtotime("-".$cnt." day", $undatecon); $ddt1 = date('m-d-Y',($undatecon2)); return $ddt1; } Function getdatepast($dtp,$cnt) { $undatecon = mktime($dtp); $undatecon2 = $undatecon - (86400 * ($cnt)); $ddt1 = date('m-d-Y',($undatecon2)); return $ddt1; } Hello i am going to try out fpdf generator, but i wanted to know if anyone knows where i can get invoice templates or how would i go to create them. Could i create them with css and html? Hello there! I'm looking for a script that generates website screenshots. I want to use a script on my server bcz, i think, it will work faster than use services like webshotspro.com or any other, and have no restriction on size. I need a script that can cache the screenshot and refresh it every 2 weeks for example. Hope that you can help me on this. Thank you in advance! |