
jrobles
Members-
Posts
66 -
Joined
-
Last visited
Never
Everything posted by jrobles
-
Greeting, I am working on a PHP project that requires uploading and converting videos using ffmpeg. I got the script to work with .MOV files, but for some reason .AVI files do not work. Any suggestions?? here is a stripped down version of my ffmpeg script This works fine: exec(ffmpeg -i movie.mov movie.flv); This does not work: exec(ffmpeg -i movie.avi movie.flv);
-
I am trying to setup recurring payments with paypal, I also need notification when the account is successfully charged again a month later. If the charge did not go through I need to flag the subscription in the database and deactivate the account. any tips on how to get the monthly charge result from paypal? I can handle the rest I just need get the info from paypal
-
I know, min($array); works like a champ but only gives me the single lowest value in the array. I need the two lowest values in the array
-
I'm trying to find the 2 lowest values in an array. I know how to grab the lowest value min() but i cannot seem to figure out the syntax to find the 2, 3 or 4 lowest values. Any suggestions?
-
I'm working on a moble site designed for iphones and I need to be able to capture location coordinates using the iphones gps. i found a script that can get me the coordinates but I am not sure how to take these coordinates and place them in php vars so i can enter them into the database here is the code used to get the current location: <script> navigator.geolocation.getCurrentPosition(foundLocation, noLocation); function foundLocation(position) { var lat = position.coords.latitude; var long = position.coords.longitude; alert('Found location: ' + lat + ', ' + long); } function noLocation() { alert('Could not find location'); } </script> any suggestions on getting this script to talk to php?
-
im using $message as the email body for phpmailer
-
thanks wildteen88 that worked
-
thanks for your help guys, but its not working quite right. premiso's code returned: ProductID Count 1 7 3 2 jskywalker's code returned: 7
-
$qry ="SELECT ProductID, SUM(QtyOrdered) AS Count FROM OrderHeader_1 JOIN OrderDetail ON OrderHeader_1.OrderID = OrderDetail.OrderID WHERE OrderHeader_1.OrderID = $oid GROUP BY ProductID"; $result = @mysql_query($qry); $rows = mysql_fetch_array($result); returns: ProductID Count 1 7 3 2 how can I place the array contents in $message so I can email the query results using phpmailer
-
i tried using $message = while($row = mysql_fetch_array($result)) {echo "Product ID: $row[ProductID] Qty: $row[Count]<br>";} but that didnt work. Any suggestions?
-
do you have an example? I am unsure of how to place all the array contents inside of $message
-
?
-
so i do not have to loop through the individual items? Won't your example only print the first record?
-
hello, I am querying a table and need to email the result of my query. The results are placed in an array since I am grouping and counting data. Here is my query code $qry ="SELECT ProductID, SUM(QtyOrdered) AS Count FROM OrderHeader_1 JOIN OrderDetail ON OrderHeader_1.OrderID = OrderDetail.OrderID WHERE OrderHeader_1.OrderID = $oid GROUP BY ProductID"; $result = @mysql_query($qry); $row = mysql_fetch_array($result); The above query will output Product1 10 Product2 20 Product3 45 etc. I am using phpmailer and I need the array to placed inside $message i.e. $message = "QUERY ARRAY RESULTS HERE"; Any help would be greatly appreciated
-
thanks, i have been looking for IP ranges for specific states but cant seem to find a reliable list online
-
Does anyone know how I can grab the state where a user came from? I need to grab this because I need to have users from one state view the site differently than visitors from another state.
-
sorry for not posting enough info. The pool is verry simple and I assumed that one table would work. Here is the script for the table I have created CREATE TABLE IF NOT EXISTS `questionnaire` ( `id` int(11) NOT NULL AUTO_INCREMENT, `source` char(1) COLLATE utf8_unicode_ci NOT NULL, `date` datetime NOT NULL, `q1` tinyint(4) NOT NULL, `q2` tinyint(4) NOT NULL, `q3` tinyint(4) NOT NULL, `q4` tinyint(4) NOT NULL, `q5` tinyint(4) NOT NULL, `q6` tinyint(4) NOT NULL, `q7` tinyint(4) NOT NULL, `q8` tinyint(4) NOT NULL, `q9` tinyint(4) NOT NULL, `q10` tinyint(4) NOT NULL, `q11` tinyint(4) NOT NULL, `q12` tinyint(4) NOT NULL, `q13` tinyint(4) NOT NULL, `q14` tinyint(4) NOT NULL, `q15` tinyint(4) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=12 ;
-
I have a table that collects the data from a 15 question poll. Each question has 3 options 1,2 or 3. i.e. yes no maybe Do you like water? Do you like soda? etc. My table has a row for each poll. the row has a column for each question i.e. DATE,Q1,Q2,Q3,Q4... I need to output the results in a table where i have the questions and the totals for each option. i.e. <table width="406" border="1"> <tr> <td width="42"> </td> <td width="98">1<br /> No Interest</td> <td width="95">2<br /> Some Interest</td> <td width="143">3<br /> High Interest</td> </tr> <tr> <td>1</td> <td>9</td> <td>0</td> <td>1</td> </tr> <tr> <td>2</td> <td>10</td> <td>0</td> <td>0</td> </tr> <tr> <td height="23"><strong>3</strong></td> <td>5</td> <td>5</td> <td>0</td> </tr> <tr> <td><strong>4</strong></td> <td>3</td> <td>3</td> <td>4</td> </tr> <tr> <td><strong>5</strong></td> <td>9</td> <td>1</td> <td>0</td> </tr> <tr> <td><strong>6</strong></td> <td>6</td> <td>2</td> <td>2</td> </tr> <tr> <td><strong>7</strong></td> <td>8</td> <td>1</td> <td>1</td> </tr> <tr> <td><strong>8</strong></td> <td>7</td> <td>2</td> <td>1</td> </tr> <tr> <td><strong>9</strong></td> <td>5</td> <td>4</td> <td>1</td> </tr> <tr> <td><strong>10</strong></td> <td>5</td> <td>5</td> <td>0</td> </tr> <tr> <td><strong>11</strong></td> <td>3</td> <td>4</td> <td>3</td> </tr> <tr> <td><strong>12</strong></td> <td>1</td> <td>1</td> <td>8</td> </tr> <tr> <td><strong>13</strong></td> <td>2</td> <td>8</td> <td>0</td> </tr> <tr> <td><strong>14</strong></td> <td>7</td> <td>2</td> <td>1</td> </tr> <tr> <td><strong>15</strong></td> <td>3</td> <td>3</td> <td>4</td> </tr> </table> any suggestions?
-
each record has one image, one price, one name, and two links based on the id i.e. product.php?id=1 cart.php?id=1
-
I am having a problem figuring out how to dynamically populate my table with info from my db. In the past I have been able to do this with tables that only have one DB table row per html table row, but this time I need to have three html table columns each with a row from the db.. here is a static example of what I need: <table width='335' border='0' align='center' cellpadding='2' cellspacing='0' id='nfpcatalog2'> <tr> <td colspan='2' align="center" valign='top'>$IMAGE1</td> <td colspan='2' align="center" valign='top'>$IMAGE2</td> <td colspan='3' align="center" valign='top'>$IMAGE3</td> </tr> <tr> <td width="68" valign='top'>$LINK1</td> <td width="69" valign='top'>$LINK1a</td> <td width="61" valign='top'>$LINK2</td> <td width="60" valign='top'>$LINK2a</td> <td width="86" valign='top'>$LINK3</td> <td width="63" valign='top'>$LINK3a</td> </tr> <tr> <td colspan='2' align="center" valign='top'>$TITLE1</td> <td colspan='2' align="center" valign='top'>$TITLE2</td> <td colspan='3' align="center" valign='top'>$TITLE3</td> </tr> <tr> <td colspan='2' valign='top'><div align='center'>$PRICE1</div></td> <td colspan='2' valign='top'><div align='center'>$PRICE2</div></td> <td colspan='3' valign='top'><div align='center'>$PRICE3</div></td> </tr> <tr> <td height="19" colspan='7' valign='middle'><hr /></td> </tr> <tr> <td colspan='2' align="center" valign='middle'>$IMAGE4</td> <td colspan='2' align="center" valign='middle'>$IMAGE5</td> <td colspan='3' align="center" valign='middle'>$IMAGE6</td> </tr> <tr> <td width="68" valign='top'>$LINK4</td> <td width="69" valign='top'>$LINK4a</td> <td width="61" valign='top'>$LINK5</td> <td width="60" valign='top'>$LINK5a</td> <td width="86" valign='top'>$LINK6</td> <td width="63" valign='top'>$LINK6a</td> </tr> <tr> <td colspan='2' align="center" valign='top'>$TITLE4</td> <td colspan='2' align="center" valign='top'>$TITLE5</td> <td colspan='3' align="center" valign='top'>$TITLE6</td> </tr> <tr> <td colspan='2' valign='top'><div align='center'>$PRICE4</div></td> <td colspan='2' valign='top'><div align='center'>$PRICE5</div></td> <td colspan='3' valign='top'><div align='center'>$PRICE6</div></td> </tr> </table> as you can see there are two rows and three columns of products. right now I only have 6 products so everything fits well, but when I add more products I will need to add pagination but I wont open that can of worms until I get this resolved. thanks for your help
-
I have a table that I want to convert into a dynamic mysql driven table. The table below is the static table that I want to change. It needs to be the same width and #of columns and rows. For now I have 6 products but want when I add more to the db i want them to show up with pagination for my layout only allows for 6 products at a time <table width='580' border='0' align='center' cellpadding='2' cellspacing='0' id='nfpcatalog'> <tr> <td colspan='2' valign='top' width='193'><div align='center'><a href='#'><img name='Item' border='0' src='images/cream-thumb.jpg' width='100' height='100' alt='Intensive Anti-Aging Night Cream' title='Intensive Anti-Aging Night Cream' style='background-color: #CCCCCC' /></a></div></td> <td colspan='2' valign='top' width='193'><div align='center'><a href='#'><img name='Item' border='0' src='images/lotion-thumb.jpg' width='100' height='100' alt='Daily Rewind Lotion' title='Daily Rewind Lotion' style='background-color: #CCCCCC'></a></div></td> <td colspan='3' valign='top' width='193'><div align='center'><a href='#'><img name='Item' border='0' src='images/milk-thumb.jpg' width='100' height='100' alt='Transforming Cleansing Milk' title='Transforming Cleansing Milk' style='background-color: #CCCCCC'></a></div></td> </tr> <tr> <td valign='top'><div align='right'><a href='#'><img src='images/moreinfo4.png' alt='More Info' title='More Info' width='50' height='35' border='0' /></a></div></td> <td valign='top'><div align='left'><a href='cart.php?action=add&id=2'><img src='images/addtocart4.png' alt='Add to Cart' title='Add to Cart' width='50' height='35' border='0' /></a></div></td> <td valign='top'><div align='right'><a href='#'><img src='images/moreinfo4.png' alt='More Info' title='More Info' width='50' height='35' border='0' /></a></div></td> <td valign='top'><div align='left'><a href='cart.php?action=add&id=2'><img src='images/addtocart4.png' alt='Add to Cart' title='Add to Cart' width='50' height='35' border='0' /></a></div></td> <td valign='top'><div align='right'><a href='#'><img src='images/moreinfo4.png' alt='More Info' title='More Info' width='50' height='35' border='0' /></a></div></td> <td valign='top'><div align='left'><a href='cart.php?action=add&id=2'><img src='images/addtocart4.png' alt='Add to Cart' title='Add to Cart' width='50' height='35' border='0' /></a></div></td> </tr> <tr> <td colspan='2' valign='top' width='193'><div align='center' class='style2'>Intensive Anti-Aging Night Cream</div></td> <td colspan='2' valign='top' width='193'><div align='center' class='style2'>Daily Rewind Lotion</div></td> <td colspan='3' valign='top' width='193'><div align='center' class='style2'>Transforming Cleansing Milk</div></td> </tr> <tr> <td colspan='2' valign='top' width='193'><div align='center'>$75.00</div></td> <td colspan='2' valign='top' width='193'><div align='center'>$75.00</div></td> <td colspan='3' valign='top' width='193'><div align='center'>$65.00</div></td> </tr> <tr> <td colspan='8' valign='top'><hr></td> </tr> <tr> <td colspan='2' valign='top' width='193'><div align='center'><a href='#'><img name='Item' border='0' src='images/masque-thumb.jpg' width='100' height='100' alt='Facial Renewal Clay Masque' title='Facial Renewal Clay Masque' style='background-color: #CCCCCC'></a></div></td> <td colspan='2' valign='top' width='193'><div align='center'><a href='#'><img name='Item' border='0' src='images/toner-thumb.jpg' width='100' height='100' alt='Balancing Marine Toner' title='Balancing Marine Toner' style='background-color: #CCCCCC'></a></div></td> <td colspan='3' valign='top' width='193'><div align='center'><a href='#'><img name='Item' border='0' src='images/scrub-thumb.jpg' width='100' height='100' alt='Purifying Marine Scrub' title='Purifying Marine Scrub' style='background-color: #CCCCCC'></a></div></td> </tr> <tr> <td valign='top'><div align='right'><a href='#'><img src='images/moreinfo4.png' alt='More Info' title='More Info' width='50' height='35' border='0' /></a></div></td> <td valign='top'><div align='left'><a href='cart.php?action=add&id=2'><img src='images/addtocart4.png' alt='Add to Cart' title='Add to Cart' width='50' height='35' border='0' /></a></div></td> <td valign='top'><div align='right'><a href='#'><img src='images/moreinfo4.png' alt='More Info' title='More Info' width='50' height='35' border='0' /></a></div></td> <td valign='top'><div align='left'><a href='cart.php?action=add&id=2'><img src='images/addtocart4.png' alt='Add to Cart' title='Add to Cart' width='50' height='35' border='0' /></a></div></td> <td valign='top'><div align='right'><a href='#'><img src='images/moreinfo4.png' alt='More Info' title='More Info' width='50' height='35' border='0' /></a></div></td> <td valign='top'><div align='left'><a href='cart.php?action=add&id=2'><img src='images/addtocart4.png' alt='Add to Cart' title='Add to Cart' width='50' height='35' border='0' /></a></div></td> </tr> <tr> <td colspan='2' valign='top' width='193'><div align='center' class='style2'>Facial Renewal Clay Masque</div></td> <td colspan='2' valign='top' width='193'><div align='center' class='style2'>Balancing Marine Toner</div></td> <td colspan='3' valign='top' width='193'><div align='center' class='style2'>Purifying Marine Scrub</div></td> </tr> <tr> <td colspan='2' valign='top' width='193'><div align='center'>$85.00</div></td> <td colspan='2' valign='top' width='193'><div align='center'>$65.00</div></td> <td colspan='3' valign='top' width='193'><div align='center'>$55.00</div></td> </tr> </table> Any help would be greatly appreciated
-
thanks, so this will capture the form data before it goes to the paypal site?
-
I have a paypal checkout form that I use to collect payments on my website. I am having a difficult time passing variables to paypal, and my question is how can I add form field data to a session before the paypal form takes the customer to the paypal site?
-
Thanks for the help, I figured out a work-around that happy with. The form action is set to "". When the user submits the form the data is entered then a confirmation shows where the user can doublecheck their info then hit submit. The second form sends the data to the payment gateway.
-
Thanks a million btw