Jump to content

Camyden74

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Camyden74's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I have a form that users input user name, password, and email... all writes to csv fine. My problem is I need to concatenate a a string with a variable and some html code will preserving the html when written to the csv.. I need the csv to be this username,password,email,user,category,text with http://sub.domain..com/splash/,something,something here's what i have <?php if($_POST['formSubmit'] == "Submit") $varUserName = $_POST['username']; $varPW = $_POST['PW']; $varEmail = $_POST['email']; { $fs = fopen("testcsv.csv","a"); fputcsv($fs, array($varUserName,$varPW,$varEmail,"user","title",",category","some text '<a href="http://$varUserName.url.com/splash/>site.com</a>',)); fclose($fs); exit; } ?> and of course I'm getting Parse error: syntax error, unexpected T_STRING, expecting ')' on line 9
  2. uhmmmm yeah I'm a moron.. lol all I had to do was order it by ID... duh!
  3. I'm importing posts from a csv file into a wordpress database. The upload works fine. What I need to do after the upload is then grab a csv file of the urls that where created, in the order they were created. For some reason it's pulling all of the posts urls in what looks to be random order. MySQL client version: 5.1.49 SELECT `post_content` , `guid` FROM wp_posts a LEFT JOIN wp_term_relationships b ON ( a.ID = b.object_id ) LEFT JOIN wp_postmeta c ON ( a.ID = c.post_id ) LEFT JOIN wp_term_taxonomy d ON ( d.term_taxonomy_id = b.term_taxonomy_id ) LEFT JOIN wp_terms e ON ( e.term_id = d.term_id ) WHERE e.term_id =19 ORDER BY guid ASC This gives me a great list but it is strangely random. The titles are all the same so they are appended with a number and should be in order when they post. And maybe this is the order in which the content was posted I don't know.. but shouldn't it post in the same order as my csv file? results: http://url.com/post10 http://url.com/post10 http://url.com/post100 http://url.com/post101 http://url.com/post11 http://url.com/post11 http://url.com/post111 http://url.compost112
×
×
  • 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.