Jump to content

Harlequin

Members
  • Posts

    16
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

Harlequin's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. It's what I was thinking because I could easily have 5 or even 10 users all sending 250 invites simultaneously and I'd simply get my account shut down I think.
  2. Hi I have a system where users can invite up to 250 people to attend an event. The problem is that I do not want to send 250 mails all at the same time so I used a script that does the following: // Send Mail: $i = 0; while ($i <= $Number) { And then sends the mail until the number reaches 250. I added a sleep if the number reached "X" or "Y" but that simply held up the page and returned an error so I am thinking that perhaps instead of sending the mail immediately I push them into a database and then run a CRON job every few seconds to send a bunch of the mails. Suggestions...?
  3. I had a similar issue in which I needed to grab a part of a string from within a much longer string that changed but the start and end of the string would always remain the same so I used this: http://php.net/manual/en/function.strtok.php
  4. Hi I come across statistics all the time for what percentage of businesses use the book of faces, that birdy site and the good old ogle site and it got me thinking... Surely it would be possible for me to write some PHP code that executes a Google search for all businesses with "Location" in the domain name and find most (I know this won't capture EVERY business) businesses locally. Then go to each of these links individually and parse the content for links back to said social media websites. Thoughts...?
  5. Hi guys I could really do with some help on this. For some reason if I direct someone to a page and inject a reference into the URL it loads into the session var but when they navigate away it's dropped.
  6. Hi creata.physics Thanks for that, I think I can work with it. Will get back to you if I need any more help. Again, thanks...
  7. Can you create the php file also please...
  8. Post a link to the site please. Also, can you create a page called phpinfo.php and put the following code in please: // Show all information, defaults to INFO_ALL <?php phpinfo(); ?>
  9. Hi Maybe a strange request and perhaps someone here knows a better way of doing what I want. I have a sign up form on my website that automatically pulls the session var 'name' and places this in the text field for "Reference". That way I know which agent signed up a customer. What I need to do now though is allow this variable to be injected through the url for click through banners. This what I've done (within the header HTML Tags): if ($_GET['Reference'] == '') { $_SESSION['Name'] = $my->name; } else { $_SESSION['Name'] = $_GET['Reference']; } However, even though this is loaded on EVERY page view the variable is empty if the user clicks another page.
  10. Mmmm... OK, I get what you're doing and inserted the code like so: $Query01 = "SELECT * FROM `CustomerSignups` WHERE `Id` = '$_GET[id]'"; $Result01 = mysql_query($Query01) or die("Error 01: " . mysql_error()); while ($get_info = mysql_fetch_assoc($Result01)) { $get_info[] = $get_info; } foreach ($get_info as $key => $value) { echo "<p>$key - $value</p>"; } } But I get this: Warning: Invalid argument supplied for foreach() in /home/... : eval()'d code on line 18 This is line 18: foreach ($get_info as $key => $value) But I can't see where the problem is. Obviously I'm going to perservere with this as my old way of doing it, calling out each table field individually is simply a waste of time and won't include new table fields.
  11. Hi. The idea: I want to pull a client record and simply place all the row columns into editable form field text boxes. Once the user reviews and edits a submit button will update the record. What I have: $Query01 = "SELECT * FROM `CustomerSignups` WHERE `Id` = '$_GET[id]'"; $Result01 = mysql_query($Query01) or die("Error 01: " . mysql_error()); while ($get_info = mysql_fetch_row($Result01)) { foreach ($get_info as $field) echo "<p>$field</p>"; It displays as expected, a line for each field. How can I get this to pull the field names also and then I can use those as text box input fields...?
  12. Hi guys. Thanks very much for your help so far on this. The code as it stands does what it says on the tin: <?php // Get Post Data: $Items = $_POST['Id']; $Brands = $_POST['Brand']; $Descriptions = $_POST['Description']; $Prices = $_POST['Retail']; $Qtys = $_POST['Qty']; ?> <p>Items: <?php echo var_dump ($Items); ?></p> <p>Brands: <?php echo var_dump ($Brands); ?></p> <p>Descriptions: <?php echo var_dump ($Descriptions); ?></p> <p>Prices: <?php echo var_dump ($Prices); ?></p> <p>Qtys: <?php echo var_dump ($Qtys); ?></p> <?php if (!empty ($_POST['Qty'])) { foreach ($_POST['Qty'] as $key => $quantity) { if (!empty ($quantity)) { echo "User ordered {$quantity} of item with ID no: {$_POST['Id'][$key]}"; } } } ?> Which produces this: Items: array(5) { [0]=> string(1) "1" [1]=> string(1) "2" [2]=> string(1) "3" [3]=> string(1) "4" [4]=> string(1) "5" } Brands: array(5) { [0]=> string( "McVities" [1]=> string( "McVities" [2]=> string( "McVities" [3]=> string(5) "Carrs" [4]=> string(6) "Jacobs" } Descriptions: array(5) { [0]=> string(13) "Hob Nobs 250g" [1]=> string(30) "Milk Choc Digestive 250g tube" [2]=> string(13) "Rich Tea 200g" [3]=> string(28) "Water Biscuits Bite Size125g" [4]=> string(19) "Cream Crackers 200g" } Prices: array(5) { [0]=> string(4) "2.33" [1]=> string(4) "2.58" [2]=> string(4) "1.39" [3]=> string(4) "2.14" [4]=> string(4) "2.12" } Qtys: array(5) { [0]=> string(2) "11" [1]=> string(2) "12" [2]=> string(0) "" [3]=> string(0) "" [4]=> string(0) "" } User ordered 11 of item with ID no: 1User ordered 12 of item with ID no: 2 What I actually need to do is the following: For each item that has a value for $_POST['Qty'] I need to get the price and ID. I know I'm probably explaining this badly but can you see what I mean...?
  13. GingerRobot What I need to do is code these results into some useable format so I can create session variables for the price and id so what you've given me allows me to do this. I'm very grateful, I should be able to code some useful results from this nowbut if I get stuck could I come back to you...?
  14. Hi guys. Bit stuck here. I have a form that uses the database to display results, no issues there. However, I need to be able to acertain what the user has selected when the form has been submitted and I've been trying for about a week now to get the thing working. Here's where I'm at... <?php while($row = mysql_fetch_array($Result01)) { ?> <tr> <td><?php echo $row['Brand']; ?></td> <td><?php echo $row['Description']; ?></td> <td><?php echo $row['Retail']; ?></td> <td> <input type="hidden" name="Id[]" value="<?php echo $row['Id']; ?>" /> <input type="hidden" name="Retail[]" value="<?php echo $row['Retail']; ?>" /> <input type="hidden" name="Brand[]" value="<?php echo $row['Brand']; ?>" /> <input type="hidden" name="Description[]" value="<?php echo $row['Description']; ?>" /> <input type="text" name="Qty[]" size="2" maxlength="2" /> </td> </tr> <?php } ?> When the user submits I can see the arrays generates but need to do the following: 1. Ascertain which items were actually selected by the user. 2. How many of each item selected was chosen. I'm quite sure I'm close to finishing it but this last stumbling block has me beat and any help would be appreciated...
  15. Hi. I need to find a clean way of getting users to update the database. I'd ideally like to use a sungle web based form that performs the following actions with one single page: 1. Grabs a localised CSV file 2. Truncates/Updates the database Is this possible...?
×
×
  • 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.