jagguy
Members-
Posts
226 -
Joined
-
Last visited
Everything posted by jagguy
-
thanks for that i will give it a try.
-
Hi, I am wondering how to do this efficiently in php. I have a table of data with 1 col has the category_id and another has a parent_id eg category_id category parent_id 1 hardware 0 2 DVD 0 3 action 2 4 carchase 3 5 cars 0 etc action is a subcategory of DVD and carchase is a subcategory of action. How can i list all this data in some sort of order of category with subcategories listed below each category with php/myql.
-
Hi, Tkanks for that answer. how do you remove the last number and '_' from the same list? I can do it a long way but is their an easy way. eg 1_19_65 to 1_19
-
Hi, I am recieving a POST variable with numbers seperated by underscores in this format eg 2_19 or 1_2_12 etc of variable length but usually no more than a few underscores between each number. How can i extract the numbers from this string as I have looked at substr but this requires knowing the exact length of the numbers. If i don't know the size and numbers before hand what can i do to get the numbers seperated by underscore on their own?
-
thanks for the answer, i appreciate it. Do you happen to know how zenlink works in php?
-
hi, I want to use php to display a table with data fields added over the past 4 weeks . This table has a field 'added' of type datetime( eg 2007-22-03 12:32:14) . How do i do this in php? select * from categories where products_date_added > (todays date - 4 weeks)
-
hi, I thought some people would like to know that not everyone knows about php and what it does. A few guys on a ecommerce forum (the ecommerce product was made with php), thought php was a program that makes ecommerce websites only. So when i asked can i add php to webapges they replied 'why would you do that and for what specific purpose over and over again?' To them php is coded in a modular style and logic where each line of text on a webpage is displayed from a different variable from various files. They kept asking why would you want to add php as they never heard of a need to use it on a ecommerce site. Does php have an image problem as I met a few people like this (not just 2)who believe php is not something you code with but use from packages made by it. Or does ecommerce have such a poor name that packges are avoided?
-
I didn't know whether to start a new thread, and you can ignore the previuos posts by me. Can you get a ecommerce system that allows you to add your own php code. The reason I asked is that eg zencart are systems that are programmed in php. They don't allow extra php code to fit in easily , if at all. Zencart/oscommerce are systems that only let you have a certain layout and functionality. I wanted a package to add links to my own pages with php/flash etc.
-
Ok I see that if you have an existing site with php then all you do is add a 3rd party tool like paypal to items to buy. Other wise use a shopping cart program eg zencart which dictates how a website will be. The paypal buttons eg view cart goto the paypal website. What i want to do is have all the fields on site as script given here on the thread. Using php to do this. Where can i get information on having all the forms for online purhcasing on my website then click on a paypal button to goto the merchant?
-
Does the script mean you don't need anything else for online purchasing eg shopping cart. Shopping carts are good only if you have some say on the layout.
-
Hi, Thanks for the information, and can i ask where did you get this. Is this common script or did you make it yourself? how does a bank get this information? i see scripts from zencart ,oscommerce that process payments on own site but you still somehow have to get a bank involved?
-
when i have used credit card on the net I never had to sign up to paypal as i just typed my details in using mastercard. I want that system. Also I am learning emcommerce for my own benefit.
-
I want to add a function to allow an online purchase from an existing php website. eg I have a table of value i just want to click a link and we get to some purchase option. What i am finding is a free shopping cart has an all in 1 solution where the whole website is created from scratch. After a lot of setups and confusion I am after a add-on simple system. I looked at paypal but that just takes a link to paypal which I really didn't like. I am still trying to set up oscommerce and it uses php.Set is a little messy so far.
-
thanks for that. I still ok at google but i don't see the point on not asking for people's opinions on it. Google doesn't always save time .
-
The thing I want was to have a shopping cart to ad onto an existing website with tables of information. Like an extra link on a table. The ones i see are for a few products but a shop can have tables of information which can require a link for further information.
-
I have a ecommerce site that requires details for my mysql /php which works fine. The pproblem is i have no password set for the database and it requires a password and a Database Host Address: which i have no idea what to put. I created the db with phpadmin and if i set a passwrod for this i will have to set a passwrod for all databases.
-
yes i know this as i said i already found a php free cart which failed. The reason i asked is that searhcing through dozens of links I didn't find 1! I spent over an hour looking and getting nowhere. Just putting 'php free shopping cart etc ' gives you free as in download cost or trial or some other rubbish. Most tags put free to attract hits as you should no this. Rarely free means free and i think it is wise to ask a place where you might find 1 from someone's experience, and also i might still find 1 on google. This is a forum where we can ask these questions so we don't end up spending hours on google.
-
Is there a good free shopping cart around with php/mysql, and maybe be able to integrate into a current website (not essential). I tried shop script only to see a blank screen after install?
-
Hi, I think i ned to add this for future reference for other peope. Flash/php integration is very messy full of quirks. They don't work well together and you should only do simple stuff. My localhost works fine but take that to a remote host and that's where the fun starts. in the php file getting the last value means setting a dummy value otherwise non-readbale chars are added. Not on my localhost though. $files="files=".$filestr."&done=".$pageNo; NOT $files="files=".$filestr.; which is what i had. also if you want to overwrite a file on remore server upload the swf and html as well with a new file name , because it won't refresh the old one. I kept getting the old swf after i overwrite it. even deleting the run then upload file still fails. Also I needed to set visible properties to true i initially if they can e turned off. This doesn't happen on loacal machine. That is 3 quirks with flash and it has taken many hours working it out. I am tired from having to debug this which shouldn't really happen. It seems to work as what my local copy does. This is a little too much I think. Flash/php integration maybe a little too messy to do anything more than just basic stuff.
-
Hi, I have yet another quirk with php/flash. When i chose a value from the combo list it fails to return any records from the list. Now here is the quirk, it only happens when i chose the last value of a combo list in flash to send to the php file. So I add another choice to the combo list and the 2nd last value works as expected but again not the last. THIS really has happens and i am really really sick of little time consuming quirks like this . Natuarally this works fine on my localhost. --- send_lv.alName=combo1.value; //last value never works send_lv.offset=offset; send_lv.pageNo=1; send_lv.sendAndLoad("http://jagguy.ej.am/flash/snlCombo2.php", nameVars, "GET"); --- <?php include("dbconnect.php"); //$alName="photo1"; error_reporting(0); $alName=$_GET['alName']; $offset=$_GET['offset']; $pageNo=$_GET['pageNo']; $startoffset=0; $startoffset=$offset*($pageNo-1); $sql4="select id from album where Name='$alName' "; $result4 = mysql_query("$sql4") or die("Invalid query: " . mysql_error()); $nt2=mysql_fetch_array($result4) ; $alNum=$nt2['id']; $sql = "SELECT * FROM image2 WHERE (del !='deleted' or del is null) and albumId='$alNum' ORDER BY id DESC LIMIT $startoffset, $offset"; //$sql = "SELECT * FROM image2 WHERE (del !='deleted' or del is null) and albumId!='99' "; $result = mysql_query($sql) or die("Invalid query: " . mysql_error()); //echo mysql_num_rows($result); if (mysql_num_rows($result)==0) { echo "<br><br>Nothing to display from photoAlbum :".$alName; echo "<br> <a href='viewPhoto.php'>Display more photos </a> "; } else { $i=1; //$nt=mysql_fetch_array($result) ; while($nt=mysql_fetch_array($result)) { $file[$i]=$nt['filename']; $i++; } } $total=0; $total=$i-1; $filestr=""; for($j=1;$j<$total;$j++) { $filestr=$filestr.$file[$j].","; } $tt="qqq"; $sql = "SELECT * FROM image2 WHERE (del !='deleted' or del is null) and albumId='$alNum' "; $result = mysql_query($sql) or die("Invalid query: " . mysql_error()); $totalrec=mysql_num_rows($result); mysql_close($link); //need to add last file on its own $filestr=$filestr.$file[$total]; //$files="files=".$filestr."&totalrec=".$totalrec."&pageNo=".$pageNo."&alName=".$alName; $files="files=".$filestr."&totalrec=".$totalrec."&pageNo=".$pageNo; echo $files ; ?>
-
My php script fails if i use include statement in a script with headers. If I copy and paste the include file in it works. The include will work if i don't use the header staement in the script. The eeror says it outputs to the screen with include(which it doesn't in the code?)
-
[quote author=spfoonnewb link=topic=124231.msg514443#msg514443 date=1169854815] Huh? What does your include statement look like? Does the file exist? Codes would help [/quote] i include this include("dbconnect.php"); -- the file below <?php error_reporting(E_ALL); // some basic sanity checks //connect to the db $link = mysql_connect("localhost", "jagguy_root", "")or die("Could not connect: " . mysql_error()); // select our database mysql_select_db("jagguy_formdata") or die(mysql_error()); ?> ps what does the & symbol do again?
-
1)I am gettin some warnings I want to supress, eg I am going through a dir and deleting files and the file '.' and '..' comes up with warnings when trying to delete. What is @ and & in regards to error supression. 2)Also when using include statement I sometime sget an error with header files as it thinks this echos to the screen and fails. When i get rid of includes statement it works fine. Can I suppress this statements like with 'warnings'?
-
The thing is is that it does pass the value correctly on my machine. On my machine it was thouroughly tested in all aspects. I never would port a program without testing such things. To have the same code fail on another website is confusing. I will have to create a smaller program and test it on the other website with just sendnload from flash. Obviously there are a few time consuming quirks here. thanks for the replies by the way.